Converting from PDF to HTML

If you have trouble running these examples please see Using the Command Line and Helpful Hints For Creating a Command Line.

Converting a Single File

To convert a single file (D:\MyFolder\Doc1.PDF to C:\Results Folder\Doc1.HTM), use the following syntax:

 

ConvertDoc /S "D:\MyFolder\Doc1.PDF" /T "C:\Results Folder\Doc1.HTM" /C2 /M3 /E /V

 

The /S and /T switches above specify Source (input) and Target (output) path respectively and are both required when converting a single file.
Use double quotes around the path, especially if there are space characters within the path.

The /M3 switch tells Convert Doc to use the PDF Conversion method (it is one of the three possible conversion methods).

/C2 is the output file type, which, in this case, is a html file. The File Type Constants Specification for the PDF Conversion method showz that the numeric value of 2 corresponds to a text file.

The /E switch is optional and specifies that the conversion be done 'very fast'. Use this for super-fast conversions. It will work on most PDFs but may be problematic for PDFs created with lesser-known editors. Removing the /E switch may cause better retention of the positional layout of the text and formatting (bold, font size, images etc.).

The /V (for Verbose) switch is used to give instant feedback by having the program report the status of the conversion with a message box. You can remove this once you have perfected your command line specification. You can also (or instead of /V) create a Log file that will contain the results of the conversion by using the /L switch.

Note: Use the Verbose (/V) switch initially to see what the status of your conversion is and to help you perfect your command line. In verbose mode, CD displays messages to indicate what went wrong or right with your command line.

Converting a Whole Folder

To convert all the PDF files in the D:\ToDo\ folder to HTM files in the same directory, use the following syntax.

 

ConvertDoc /S"D:\ToDo\*.PDF" /T "D:\ToDo\*.HTM" /C2 /M3 /E /V

 

The /G switch can be used to tell Convert Doc to place each output file in the same folder as each input file.
The command line above is equivalent to the command line below:

 

ConvertDoc /S "D:\ToDo\*.PDF" /G /C2 /M3 /E /V

 

Converting a Whole Folder and all Sub-Folders

To extend the previous example (immediately above) to convert all subfolders within D:\ToDo\, add the /R switch.

 

ConvertDoc /S"D:\ToDo\*.PDF" /G /C2 /M3 /E /V /R

 

To convert a whole folder and its subfolders and place the output into a separate folder/drive, use this syntax:

ConvertDoc /S"D:\ToDo\*.PDF" /T "C:\Done\*.HTM" /C2 /M3 /E /V /R