react-native-fast-images-to-pdf
v0.1.0
Published
Support for Convert Images to PDF
Readme
react-native-fast-images-to-pdf
Support for Convert Images to PDF
Installation
npm install react-native-fast-images-to-pdfUsage
import { convertImagesToPdf } from 'react-native-fast-images-to-pdf';
// ...
const pdfPath = await convertImagesToPdf({
imageUris: [
'file:///path/to/first-image.jpg',
'file:///path/to/second-image.png',
],
outputFileName: 'invoice-images.pdf',
});convertImagesToPdf currently supports Android and iOS, and returns the absolute path of the generated PDF file in the app cache directory.
Example App Demo
The example app includes 2 demo cases and a Convert to PDF button action:
- From URLs: convert remote images directly.
- From Image Picker: select one or more images from gallery, then convert.
Demo screenshot:

API
type ConvertImagesToPdfOptions = {
imageUris: string[];
outputFileName?: string;
};
declare function convertImagesToPdf(
options: ConvertImagesToPdfOptions
): Promise<string>;Notes:
imageUrismust contain at least one local or remote image URI.outputFileNameis optional. If omitted, the module auto-generates a.pdffilename.- The returned value is the absolute file path to the generated PDF.
License
MIT
