pdf2img is a .NET application that converts PDF pages into image files. It supports multiple output formats, DPI settings, and rendering flags for customized image generation.
- Convert PDF pages to various image formats (PNG, JPEG).
- Specify DPI for high-quality image rendering.
- Support for rendering flags (e.g., Annotations, LcdText).
- Convert specific page ranges.
- Option to overwrite existing files.
- Verbose mode for detailed output.
pdf2img.exe <input.pdf> <output directory> [options]
--dpi <dpi>
: Resolution in DPI for the output image files. Use 72 for original PDF size. Default is 72.--pagerange <range>
: Range of pages to convert (e.g., 1-3,5).--format <format>
: Output image format (png, jpeg). Default is png.--quality <quality>
: Image quality for JPEG format (1-100). Default is 90.--overwrite
: Overwrite existing files in the output directory.--verbose
: Enable verbose output.--renderflags <flags>
: Rendering flags (comma-separated values). Options:None
: 0ForPrinting
: 0x800Annotations
: 1LcdText
: 2NoNativeText
: 4Grayscale
: 8LimitImageCacheSize
: 0x200ForceHalftone
: 0x400Transparent
: 0x1000CorrectFromDpi
: 0x2000
Convert all pages of a PDF to PNG images at 300 DPI:
```
pdf2img.exe "C:\Path\To\Input.pdf" "C:\Path\To\OutputDirectory" --dpi 300
```
Convert specific pages (1-3 and 5) of a PDF to JPEG images with high quality:
```
pdf2img.exe "C:\Path\To\Input.pdf" "C:\Path\To\OutputDirectory" --format jpeg --quality 100 --pagerange 1-3,5
```
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License