PDF2Image is a command-line application developed in C# that converts PDF pages into PNG images. It uses the PdfiumViewer library to render and save each PDF page as a high-quality image.
- Converts PDF files into PNG images, saving each page as a separate image.
- Supports both file and folder input:
- PDF File: Converts a single PDF file into images.
- Folder with PDFs: Converts all PDF files in a folder into images.
- Creates a unique output folder for each PDF file, organizing images by PDF.
The application can be run via command line with the following syntax:
PDF2Image.exe <input> <output>- input: Path to the PDF file or folder containing PDF files.
- output: Path to the folder where the images will be saved.
- To convert a single PDF file into images:
Copy code
PDF2Image.exe "C:\path\to\file.pdf" "C:\path\to\output"- To convert all PDF files in a folder:
Copy code
PDF2Image.exe "C:\path\to\pdf_folder" "C:\path\to\output"The application creates a subfolder within the output directory, named with the prefix [PDF] followed by the PDF file name. Images are saved with sequential names, e.g., Page_1.png, Page_2.png, etc.
During execution, the application displays messages in the console to indicate progress and results:
- Number of PDF files found in the input folder.
- Creation of output folders.
- Location of the generated PNG files.
- .NET: Make sure .NET 8 or later is installed to run the application.
- Libraries: The application uses the PdfiumViewer library for PDF rendering.
- No PDF in input folder: When the input path is a folder without any PDF files, the application will notify that no PDFs are available.
- File not found: If the PDF or folder path is incorrect, the application won’t be able to access the file.
Feel free to contribute by reporting issues or suggesting improvements.