Empower yourself with Document to Image Conversion Tools from Softinterface.

'Convert Document To Image'  Command Line Wizard

 

Convert Document to Image Command Line Examples

Here we detail exactly how to specify a command line. Simply select what you want to do from the choices below, then click Submit. Then several examples will be displayed below.

 Input File Type:

Output File Type:

Convert image to pdf command line examples.

 

Helpful Hints for Using the Command Line

 

HINT 1: It is highly suggested you first attempt your task using the User Interface prior to attempting to create an equivalent command line. Reasons for this are:

      * Make sure what you want to do can be done at all

      * Makes you aware of exactly what must be specified in the command line

      * You can very quickly test the command line by doing the easiest of all approaches, specifying a 'Conversion Job' file by using the /J switch.

HINT 2: It is highly encouraged that at least during the initial creation of the command line that you use the Verbose (/V) switch to see what the status of your conversion is and get any error messages.  /V shows you a message telling you how the command line went. If you are not getting any message at all while using the /V switch, then see hint 3 below, as you are probably not even executing the program. If you prefer a log file instead of a pop up message box, use /L{LogFilePath} instead of /V.

HINT 3: If see the following error:

"CDTI' is not recognized as an internal or external command, operable program or batch file."

Then please do one of the following:

   A)      (Preferred method) Specify the full path to the executable. For example:

     "
c:\program files\Softinterface, Inc\Convert Document To Image\CDTI.EXE"
 /J"D:\My Conversion Job Files\AcctBatch.SII"

      Alternatively if using a batch file you might try something like this:

  set CDTI ="c:\program files\Softinterface, Inc\Convert Document To Image\CDTI.EXE"

    %CDTI% /J"D:\My Conversion Job Files\AcctBatch.SII"

   B)      Set the path operating system variable to the location of CDTI.EXE

 

Also, it is suggested you use fully qualified paths for any files you specify.  You can however specify the current folder by using ".\" syntax. 

NOTE: Copying CDTI.EXE from the installation folder to some other folder is not likely to work well, so instead try one of the methods above.


Command Line Reference

Here you will find additional details commonly referred to when constructing a command line. The file type constants, and a full command line switch listing.

ALL COMMAND LINE SWITCHES

The syntax for the command line is:

CDTI /S{Input File(s)} /T{Output File(s)} [/1-9] [/V] [/R] [/L{LogFile}] [/I{override initialization file}] [/F#] [/C#] [/M1] [/W{PDF File Open Password}]

Items above enclosed in square brackets “[ ]” are optional, all other ‘switches’ are required. Therefore /S, /T should always be specified on the command line.
You can include or exclude spaces between switches and parameters. For example, "/C6" is the same as "/C 6". For long file names (i.e. file path and names with space characters) you will be required to use double quotes. For example, /S" C:\Program Files\MyApp\Apples And Oranges.DOC".

Switch

Meaning

/S{File}

Input File(s) to be converted.  A single file including its complete path can be specified for conversion. If specifying a single file, make sure that the /T switch also specifies a single output file, for example:

  CDTI.EXE    /S"D:\Input\Peaches.DOC" /T"D:\Output\Cobbler.TIF"

 Alternatively, you can specify whole folder by using the wildcard syntax. If specifying a whole folder, make sure the /T also specifies a whole folder. For example:

  CDTI.EXE    /S"D:\ Input\*.DOC"    /T"D:\ Output\*.JPG"

 See also /R for subfolders.

 See the /F# switch also.

/T{File}

Output File(s) to be converted.  A single file including its complete path can be specified for conversion. If specifying a single file, make sure that the /S switch also specifies a single input file, for example:

    CDTI.EXE  /S"D:\Input\Orange.PDF"  /T"D:\Output\Juice.JPG"

 Alternatively, you can specify whole folder by using the wildcard syntax. If specifying a whole folder, make sure /S switch also specifies a whole folder. For example:

    CDTI.EXE  /S"D:\Input\*.DOC"  /T"D:\Output\*.JPG"

 See also /R for subfolders.

 See the /C# switch also.

/V Verbose mode.  Specify this switch to display a message box indicating how the conversion went.  See also /L{LogFile}
/L{File} Log file path and name (i.e. d:\mylogs\WhatHappened.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
/M1 Use MS Word to render PDF. Requires Word 2007 or above. Further, you must install the Microsoft Office Add-in: Microsoft Save as PDF or XPS.

[/1{Pages To Convert}]

Which 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

Default: All pages

/2

Not used at this time.

/3{TRUE/   FALSE}

Append to existing when converting to a TIFF.  Use /3 TRUE to append /3 FALSE not to.

Default: Do not append but instead overwrite.

/4{JPEG Quality}

 

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: 75.

/5{Resolution}

Specified in DPI, the image resolution is critical.

Default: 100 DPI

/6{Width}

Width of the output image in pixels. Leave out this switch or use a value of 0 to use the size as specified within the user interface.

Default: 0

/7{Height}

Height of the output image in pixels. Leave out this switch or use a value of 0 to use the size within the user interface.

Default: 0

/8{TiffConvert

ToSingleFile }

If you are converting multiple pages in a document file to a TIFF, you can have a single file output or muli-file output.  Use /8 1 to create a single file or /8 0 to create multiple output files.

Default: 0, multi-file output

[/W{PDF File Open Password}]

When converting TO a PDF file, you can specify a File Open password using this switch.  The Example below makes the word Apples the password to open the newly created PDF file:

 

CDTI.EXE /S "c:\input files\tryme.doc" /T "c:\input files\tryme.pdf" /WApples /V

[/F #]

Optional switch used to specify the input file type. 

 NOTE:, if your input file type is a text file, it is highly recommended you use this switch. This is because there are so many different file extensions (log, dat, txt etc) used and also several encodings (Unicode vs. ASCII for example) for text files. Use /F1 for ASCII and /F6 for Unicode.

 This switch is required if the input file extensions (as specified by /S) are not standard. A non-standard file extension would be, for example, if you use /S"
C:\input\MyWordDocument.ABC"
  to specify a word file since word files are associated with DOC or DOCX file extensions, not ABC.

 Please see File Type Constants table for valid values.

[/C #]

Optional switch used to specify the output file type. 

 NOTE: If you are converting to a PDF file, you may want to specify this switch. By default the PDF and not the PDF/A file conversion is done. Therefore if you want a PDF/A output, specify /C14.

 The /C switch specifies the output file type. This switch is required if the output file extensions (as specified by /T) are not standard. A non-standard file extension would be, for example, if you use /T"
C:\Output\MyJPEG_File.ABC"
 for a JPEG files since JPEG files are associated with the JPG file extension, not ABC.

 Please see File Type Constants table for valid values.

[/I{override initialization file}]

Use a specified (and not the default) initialization file for CDTI.  This allows you to be able to specify all settings that are in the user interface from the command line, which is especially useful for those few items not available through specific command line switches.  The default initialization file can be used as a template and is located in the installation folder or in the Windows folder (e.g. C:\Windows\CDTI_SearchHistory.INI)

/J{File}

Specify a conversion job file (*.SII) to do.  You must have previously created a conversion job file in the user interface to use this switch.

 

File Type Constants

These tables show input and output file types used in both the user interface and the command line.

File Type Constant

File Type

1

TXT - Text

4

HTM - HTML

5

RTF - Rich Text Format

6

TXT - Unicode Text

9

DOC - Word Document 97-2003

12

PDF - PDF format

13

DOCX - Word Document (*.DOCX) XML format

Table 1: Input File Type Constants for use with the /F# command line switch

 

File Type Constant

File Type

1

JPG - Independent JPEG Group

2

BMP - Windows Bitmap

3

TIF - Tagged Image File Format

4

GIF - Graphics Interchange Format

5

EMF

6

J2K

7

PCX - PCX Bitmap

8

PNG - Portable Network Graphics

9

RAS - Sun Rasterfile

10

TGA - Targa File

11

WMF - Windows Meta File

12

PDF - PDF format

14

PDF - PDF/A-1b, OSI standard

Table 2: Output File Type Constants for use with the /C# command line switch

Click for the BBB Business Review of this Computers Hardware, Software & Services in Santa Monica CA