Specifying a 'Conversion Task'

The syntax for the command line for specifying a conversion task is:

 

ConvertPDFtoImage /S{Original File(s)} /T{Target 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 original folder) is specified, the /T switch is not necessary.

You can include or exclude spaces between switches and parameters. For example, "/F6" is the same as "/F 6". For long file names you may be required to use double quotes. For example, /S "C:\Program Files\MyApp\MyImage.JPG". Command switches are case sensitive, therefore /F is completely different from /f.

 

/S{Original File(s)} is used to specify which files to convert. You can specify a single file, or in some cases a whole set of files using the wildcard syntax (i.e. "C:\MyFiles\*.PDF").

 

/T{Target File(s)} is used to specify where to save the converted file(s) to. You can specify a single file, or in some cases a whole set of files using the wildcard syntax (i.e. "C:\MyFiles\*.BMP").

 

/C# tells ‘Convert PDF To Image’ what the target file type is. You must supply a number for the # symbol. For all constants see File Type Constants.

Remember the target file, specified by the /T{Target 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 (standard file extensions are jpg, tif, gif, etc). 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 files to their original folders. Use this instead of /T to place the converted files in the same folder as the original file. This cannot be used when converting a single, specified file from within a folder. Use the /T switch instead.

 

[/R] Seek out and do all files found in the sub-folders specified in the /S switch. Recursive subdirectories. 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\CITP.LOG) If this switch is specified a log file with the given path and name 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' 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 how the conversion went. 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 multipage 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 one for example use /1 1

[/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 target file. Use /4 100 for highest quality. Default is 100.

[/5] Resolution: Specified in DPI, the image resolution is critical. 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 mulitple file output. Use /8 1 to create a single file or /8 0 to create mulitple output files.

 

NOTE: If you see the following error or have any other issues: "ConvertPDFtoImage is not recognized as an internal or external command, operable program or batch file."

Then please read Helpful Hints For Creating a Command Line for further assistance.

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

Command Line Examples

Specifying a Conversion Task

Specifying a Conversion Job File

Using the Command Line

All Command Line Switches

Image File Type Constants