Tutorials
Multi-Page Processing
By default, PDF2IMG converts the pages in a PDF file into multiple single-page image files. The system assigns a name to each image file with an underscore character (_) added between the file name prefix and the sequence counter number. For example, the five pages in a PDF input file called Convert.PDF would be exported as five bitmap files:
By default, PDF2IMG converts the pages in a PDF file into multiple single-page image files. The system assigns a name to each image file with an underscore character (_) added between the file name prefix and the sequence counter number. For example, the five pages in a PDF input file called Convert.PDF would be exported as five bitmap files:
convert_1.BMPconvert_2.BMPconvert_3.BMPconvert_4.BMPconvert_5.BMP
If you are working with a long PDF document, the software will pad the sequence number with leading zeroes as needed to keep export files in order by name. So if Convert.PDF has 128 pages, the first files will be:
convert_001.BMPconvert_002.BMPconvert_003.BMP
You can control multi-page output using these optional command line arguments:
pdf-rasterize-split/pdf-split— Export a PDF document as a series of separate PDF files (one per page), rather than a graphic format like PNG or BMP. Pair with thepdf2img_set_pdf_output_type()API call.firstonly— Convert only the first page of the input PDF. Useful for testing a conversion before processing a series of long documents.multipage— Convert a multipage PDF into a single multipage TIFF document.digits— Specify the number of digits for numbering output files and suppress the underscore character. For example,-digits=3producesFILE001.JPG,FILE002.JPG, and so on.output— Specify an alternate output file name prefix. The value given will be used as the base name, with a sequence number and appropriate extension appended, such assample_1.gif,sample_2.gif, and so on.
An alternate folder location can be specified for output files, but that folder must already exist. PDF2IMG will not create it automatically.