<< Click to Display Table of Contents >> Using pdftoppm |
pdftoppm is a command line tool, which is called with the following parameters:
pdftoppm -r 300 -f <start-page> -l <last-page> your-file.pdf <target-path>
The parameter -r 300 specifies 300 DPI resolution, which we recommend (default is 150 DPI).
start-page is an integer specifying the first page to export. For each page, a separate bitmap file is created. end-page is an integer specifying the last page to export. your-file.pdf is the PDF input file. target-path is the output path for the bitmaps. Enter pdftoppm -help to see all command line options provided by this tool.
Most programming languages provide some API to call external programs by code. So you can execute pdftoppm at runtime as desired. If you have a fixed set of PDF documents you wish to import, you can pre-create the bitmaps. To save hard disk space in this case, you can convert them to TIF or PNG by using an image manipulation program, like Gimp. Don’t forget to specify the DPI resolution of the newly created image files.