Convert PDF to image in specified name template by command line

    When converting PDF to image in batch, especially when converting multipage PDF to image, there will be many image output. Some times it will be complicated to pick them out. However, if we can convert PDF to image in specified name template, this matter can be solved.  In the following part, I will show you how to convert PDF to image in specified name template.

   I use software VeryPDF PDF to Image Converter Command Line. By this software we can convert PDF to TIFF, JPEG, GIF, PNG, BMP, PCX, TGA, PBM, PGM, and PPM. And there are three versions of this software: Mac, Linux and Windows. If you need to know more, please read homepage.

Step 1. Download PDF to Image Converter Command Line

  • When downloading, please make sure download the right version as there are at least 4 versions stated on our website. Here I will take the Windows version for example.
  • When downloading finishes, there will be an zip file. Please extract it to some folder then we can call it from MS Dos Windows.

Step 2. Convert PDF to image in specified name template.

  • Usage:  pdf2img.exe [options] <PDF-file> <Output-file>
  • When converting PDF to image in specified name template, we may use the following parameters:
  • -tempname <string>  : when you need to set filename template for output image files, please add this parameter.
    -tempname1          : when you need to apply filename template for single image file, please choose this parameter.
    -quality <int>      : this parameter can help you set quality to JPEG format, from 0 to 100
    -f <int>            : when you need to specify the first page to print, please use this parameter.
    -l <int>            : this parameter can help you specify the last page to print.
    -opw <string>       : when converting owner password (for encrypted files) protected PDF to image, please add this parameter.
    -upw <string>       : when you need to convert user password (for encrypted files) protected PDF to image, please add this parameter.
    -r <int>            : when yore need to set resolution for output image file, please add this parameter, and the unit is in DPI (default is 150).

  • Now let us check some examples for converting PDF to image and specify name template.
    By the above two command line, the output file name will be original file name plus oo0, 0002 and so on so forth. 
    pdf2img.exe -tempname %04d -tempname1 C:\in.pdf C:\out.tif
    pdf2img.exe -tempname %04d -tempname C:\in.pdf C:\out.png
    The above two command line can help you output image file from image in specified name template automatically.
  • for %F in (D:\temp\*.pdf) do pdf2img.exe "%F" "D:\temp\out\%~nF.xls"
    for %F in (D:\temp\*.pdf) do pdf2img.exe "%F" "%~F.png"

By this software, we can convert PDF to image in specified name template. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!