pdfrx_engine 0.1.3
pdfrx_engine: ^0.1.3 copied to clipboard
pdfrx_engine is a PDF rendering API built on top of PDFium, designed to be used with the pdfrx plugin.
example/README.md
pdfrx_engine Examples #
This directory contains examples demonstrating how to use pdfrx_engine.
pdf2image.dart #
Converts a PDF file to PNG images (one image per page).
Usage #
dart pub get
dart run pdf2image.dart <pdf_file> [output_dir]
Example #
dart run pdf2image.dart document.pdf ./output
This will:
- Read
document.pdf - Create PNG images for each page
- Save them as
page_1.png,page_2.png, etc. in the./outputdirectory
Features #
- Renders pages at 2x scale for better quality
- Uses white background for transparent areas
- Creates output directory if it doesn't exist
- Uses the
createImageNFextension method for image conversion