The syntax for the command line for specifying a conversion task is:
ConvertPDFtoImage /S{Input File(s)} /T{Output File(s)} [/C#] [/G] [/R] [/L{LogFile}] [/B{LogToJobFile}] [/V] [/Z] [/1-9]
Items above enclosed in square brackets "[ ]" are optional, all other 'switches' are required. Therefore /S, /T should always be specified on the command line. There is one exceptions, however and that is when /G (Save to Input folder) is specified, the /T switch is not necessary.
Command switches are case sensitive, therefore /F is completely different from /f.
You can include or exclude spaces between switches and parameters. For example, "/C6" is the same as "/C 6".
For long file names (e.g. a path or file name with spaces in it, or longer than 8.3 format) you are required to use double quotes. For example:
ConvertPDFToImage.exe /S "C:\Input Folder\A.pdf" /T "C:\Output Folder\A.jpg" /1 * /4 75 /5 200 /V
/S{Input File(s)} is used to specify which files to convert. You can specify a single file, or a whole set of files using the wildcard syntax (i.e. "C:\MyFiles\*.PDF").
/T{Output File(s)} is used to specify where to save the converted file(s) to. You can specify a single file, or a whole set of files using the wildcard syntax (i.e. "C:\MyFiles\*.BMP").
/C# tells 'Convert PDF To Image' what the output file type is. You must supply a number for the # symbol. For all constants see File Type Constants.
IMPORTANT: Usually the output file(s), specified by the /T{Output File(s)} switch, has an extension which determines it's file type. /C is only required if you are not using file names with standard file extensions . For example if you working with bitmap files with file names like mybitmap.abc then you definitely need to specify the /C switch.
[/G] Save output files to same folder as the input files. Use this instead of /T to place the converted files in the same folder as the input file. This cannot be used when /S specifies a single file. For single file use the /T switch instead.
[/R] Seek out and do all files found in the sub-folders specified by the /S switch. You may add this switch if you are processing whole directories of files. See /S, /T and /G for more details on selecting whole directories to be converted.
[/L{LogFile}] Log file path and name (i.e. d:\mylogs\CPTI.LOG). If this switch is used a log file will be created and the results of the conversion will be written to it. See also /V.
[/B{LogToJobFile}] Save the Log file as a 'Conversion Job', but only if errors occurred. This is useful if the files that had problems can be done at a later time, or with a different method. /B is different from /L, since the file generated with /B will not include extraneous comments not allowed in a 'Conversion Job' file. Save as a .SII file type so it can be loaded as a job.
[/V] Verbose mode. Specify this switch to display a message box indicating success or failure after the job has run. If a failure occurred a reason is usually displayed. See also /L.
[/Z] Verbose Log. All file operations will be recorded in the log.
[/1] PDF pages to convert. For example if you have a multi page PDF and you want to convert pages 2-5 use /1 2-5 . ALWAYS put a space after the 1 in /1. To do page three for example use /1 3
[/3] TIFF: Append to existing when converting to a TIFF. Use /3 TRUE to append /3 FALSE not to.
[/4] JPEG: Quality of the resulting JPG from 0 to 100 (default is 100). 0 is lowest and 100 is highest quality. The higher the quality the larger the resulting output file. Use /4 100 for highest quality. Default is 100.
[/5] Resolution: Specified in DPI. Default is 150.
[/6] Width: Width of the output image in pixels. See bottom of this topic for additional notes on specifying Width and Height.
[/7] Height: Height of the output image in pixels. See bottom of this topic for additional notes on specifying Width and Height.
[/8] lTiffConvertToSingleFile: If you are converting multiple pages in a PDF file to a TIFF, you can have a single file output or multiple file output. Use /8 1 to create a single file or /8 0 to create multiple output files. Default is to create multiple file output.
Width and Height Specification
If you specify one as zero (or don't specify it), and the other as greater than zero, the one specified as zero will be sized in order to retain the aspect ratio. For example, if you specify a width of 100 and a height of 0, the height will be automatically adjusted to retain the aspect ratio. If both Length and Width are specified as 0, the size of the image will be the same as the original within the PDF. If length or width is specified as negative, it will be assigned the same as the original length or width respectively. This was done as in most cases the aspect ratio is desired to be retained.
See Also:
Helpful Hints for Creating a Command Line
Specifying a Conversion Job File