The syntax for the command line for specifying a conversion task is:
ConvertITP /S{Input File(s)} /T{Output File(s)} /F# [/G] [/V] [/R] [/L{LogFile}] [/B{LogToJobFile}] [/+] [/A{PDF Author}] [/D{PDF Creator}] [/K{PDF Keywords}] [/U{PDF Subject}] [/I{PDF Title}] [/Z] [/M#] [/W{Tiff Pages}]
Items above enclosed in square brackets “[ ]” are optional, all other ‘switches’ are required. Therefore /S, /T, /F# should always be specified on the command line. There is one exception, however, and that is when /G (Save to input 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".
/S{Input 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\*.BMP"). /T{Output files} should always be different from /S{Input File(s)}.
/T{Output 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"). /T{Output files} should always be different from /S{Input File(s)}.
[/F#] tells ConvertITP what the input file type is. You must supply a number for the # symbol. Remember the input file type is specified by the / S{Input File(s)} switch. For all constants see Special Process File Type Constants.
[/G] Save files to their input folders. Use this instead of /T to place the converted files in the same folder as the input file. This cannot be used when converting a single, specified file from within a folder. Use the /T switch instead.
[/V] Verbose mode. Specify this switch to display a message box indicating how the conversion went. See also /L.
[/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.
[/Z] Verbose Log. All file operations will be recorded in the log
[/+] Append (concatenate) image to the end of a PDF file.
[/A{PDF Author}] Specify the Author property of the PDF file.
[/D{PDF Creator}] Specify the Creator property of the PDF file.
[/K{PDF Keywords}] Specify the Keywords property of the PDF file.
[/U{PDF Subject}] Specify the Subject property of the PDF file.
[/I{PDF Title}] Specify the Title property of the PDF file.
[/M#] TIFF ONLY: Compression Method. 0 = No compression, 1 = LZW, 2 = RLE Compression (1bpp), 3 = CCITT3 Compression (1bpp), 4 = CCIT4 Compression (1bpp)
[/W{Tiff Pages}] TIFF ONLY: Which pages to convert. You can specify the pages individually or by ranges, seperated by commas. For example “/W 1,2,3,10,11” is the same as “/W 1-3,10-11”.
Examples:
The following examples are extremely useful for understanding how to use the command line parameters. Choose from the examples below and modify according to your needs.
Note: You will need to supply the entire path to the executable file which we have condensed to ConvertITP.EXE in these examples. Your command line text will likely need to include the following "C:\Program Files\SoftInterface, Inc\Convert Image To PDF\ConvertITP.exe”. This assumes you accepted the default location when installing ConvertITP.
Example 1: Single File Conversion
Specify the source (/S) and output files (/T), the .bmp format (/F0) of the source file, with on-screen confirmation (/V):
ConvertITP.EXE /S "C:\Samples\Coffee.bmp" /T "C:\Samples\Output\CoffeeOut.pdf" /F0 /V
Example 2: Single File Conversion With Log File Creation
Specify the source (/S) and output files (/T), the .jpg format (/F2) of the source file, and create a log file (/L) containing the confirmation information:
ConvertITP.EXE /S "C:\Samples\Ripple.jpg" /T "C:\Samples\Output\Ripple.pdf" /F2 /L"C:\Samples\LogFiles\OutputLog.LOG"
Example 3: Single File Conversion, Specify PDF Attributes
Specify the source (/S) and output files (/T), the .png format (/F13) of the source file and specify Author (/A), Keyword (/K) and Title (/I) properties for the .pdf file. Note that, after creating the .pdf file, properties can be viewed through Internet Explorer by right clicking on the file, displaying properties then selecting the PDF Properties tab:
ConvertITP.EXE /S "C:\Samples\CITPIcon.png" /T "C:\Samples\Output\Icon.pdf" /F13 /A SoftInterface.com /K Logo /I Application Logo
Example 4: Whole Folder Conversion
This example shows you how to convert all files of a particular type within a folder by using the wildcard (*). Specify the source (/S), in this case all .jpg files in the Samples folder, the output (/T), and .jpg format (/F2) of the source files. Display on-screen confirmation (/V) and create an error job file (/B) only if an error in conversion occurs:
ConvertITP.EXE /S "C:\Samples\*.jpg" /T "C:\Samples\Output\*.pdf" /F2 /V /B "C:\Samples\ErrorLogs\Error.SII
Example 5: Whole Folder Conversion, Place output in Input Folder
Convert all .bmp files in the Output folder using the wildcard (/S), save them to the same folder as the input files with the same names (/G). Create a log file (/L) with results of the conversion and create an error job file (/B) only if an error in conversion occurs:
ConvertITP.EXE /S "C:\Samples\Output\*.bmp" /G /F0 /L "C:\Samples\LogFiles\OutputLog.LOG" /B "C:\Samples\ErrorLogs\Error.SII
See Also:
Helpful Hints for Using the Command Line
Examples: Complete list of Examples of Using the Command Line
Specifying a `Conversion Job' File to Run From The Command Line