
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
react-native-image-to-pdf
Advanced tools
Create a PDF by an Array of images in React-Native.
$ npm install react-native-image-to-pdf --save
or
$ yarn add react-native-image-to-pdf
$ react-native link react-native-image-to-pdf
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-image-to-pdf
and add RNImageToPdf.xcodeproj
libRNImageToPdf.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<android/app/src/main/java/[...]/MainActivity.java
import com.anyline.RNImageToPDF.RNImageToPdfPackage;
to the imports at the top of the filenew RNImageToPdfPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-image-to-pdf'
project(':react-native-image-to-pdf').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-to-pdf/android')
android/app/build.gradle
:
compile project(':react-native-image-to-pdf')
import RNImageToPdf from 'react-native-image-to-pdf';
...
const myAsyncPDFFunction = async () => {
try {
const options = {
imagePaths: imagePaths: ['/path/to/image1.png','/path/to/image2.png'],
name: name: 'PDFName',
maxSize: { // optional maximum image dimension - larger images will be resized
width: 900,
height: Math.round(deviceHeight() / deviceWidth() * 900),
},
quality: .7, // optional compression paramter
};
const pdf = await RNImageToPdf.createPDFbyImages(options);
console.log(pdf.filePath);
} catch(e) {
console.log(e);
}
}
FAQs
Converts images to a PDF file
The npm package react-native-image-to-pdf receives a total of 2,308 weekly downloads. As such, react-native-image-to-pdf popularity was classified as popular.
We found that react-native-image-to-pdf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.