Components for Developers
© 2000-2017, Two Pilots

PDF Library   EMF2PDF SDK Pilot   Virtual Printers   HTML2PDF-X Pilot   Converters   PDF Mosaic   Design Service   PDF Rasterizer  

Command Line Specification

 

The application may be run directly from the command line, without the GUI. The format of command line is:

PDF2Text Pilot.exe ((SrcFile (DstFile)) | (/inlist SrcListFile /outlist DstListFile) 
                   | (/inlist SrcListFile /outdir DstDir)) [options]


For example:

PDF2TextPilot.exe SrcFile DstFile [options]
or
PDF2TextPilot.exe /inlist SrcListFile /outlist DstListFile [options]
or
PDF2TextPilot.exe /inlist SrcListFile /outdir DstDir [options]


Where:

SrcFile is the path to a PDF file to be converted to a text file. It can be absolute ("C:\documents\some.pdf") or relative ("some.pdf").

DstFile is the path to a created text file. If it is omitted, then the txt extension is added to SrcFile. (If SrcFile is "C:\test.pdf", then DstFile is set to "C:\test.pdf.txt".) It can also be absolute ("C:\Documents\books\some_book.txt") or relative ("some_book.txt").

SrcListFile is the path to a file that contains a list of files to be converted to text files. It can be absolute or relative. The file must contain one file name per line. Here is an example of the content of such a file:

Example of SrcListFile content

DstListFile is the path to a file that contains a list of file names to be saved. It can be absolute or relative. The file must contain one file name per line. Here is an example of the content of such a file:

Example of DstListFile content

Please note: The number of files listed in SrcListFile MUST match the number of files listed in DstListFile.

DstDir is the path to a directory where created files will be saved. It can be absolute or relative. All new paths will be the same as the source file paths plus "\TXT" ("C:\Documents\books\TXT").

Options is the list of secondary parameters that allows you to set detailed properties of a created document. These parameters are...

/all2one - Set this parameter if you want to obtain one text file from all input files.
/password value - Set this parameter if the PDF document is protected.
/author - The text files will have the same settings as the PDF file.
/subject - The text files will have the same settings as the PDF file.
/title - The text files will have the same settings as the PDF file.
/keywords - The text files will have the same settings as the PDF file.


Return Codes:

-1 Command line format error. Occurs when parameters are set incorrectly.
-2 Can't open the PDF file.
-3 The output path is not correct.
-4 The output file name is not correct.
-5 Output folder is not found.
-7 Can't open the input list file.
-10 Can't open the input list file.
-13 Input list does not match the output list. Occurs when the number of files specified in the input list is not equal to the number of files specified in the output list.


Command Line Examples:

PDF2TextPilot.exe "D:\Documents\my.pdf" "D:\Documents\my.txt"

Converts the file D:\Documents\my.pdf into a text file with default settings and saves it as D:\Documents\my.txt.


PDF2TextPilot.exe "thePDF.pdf" "theTXT.txt" /author /subject /title /password "pass"

Converts the file "thePDF.pdf" into a text file and saves it as "theTXT.txt". Sets the author, subject, and title in text file. The document "thePDF.pdf" is protected. It can be opened using the password "pass".


PDF2TextPilot.exe /inlist src.lst /outdir "D:\docs\TXT"

Converts the PDF files listed in "src.lst" into text files and saves them into the directory "D:\docs\TXT".

PDF Library   EMF2PDF SDK Pilot   Virtual Printers   HTML2PDF-X Pilot   Converters   PDF Mosaic   Design Service   PDF Rasterizer  

 

Support | Blog | Forum | Press | Contacts | About | Site Map

© 2000-2017, Two Pilots