Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support

How to use PDF2Text Pilot from the command line


PDF2Text Pilot may be run without a graphical interface by using the command line interface instead. This solution can be used to automate the conversion process.

The command line interface can be enabled by starting the cmd.exe on your machine. To do this, click "Start->Run...", type cmd.exe, and then press Enter. PDF2Text Pilot adds the path to the application folder in the PATH environment variable during installation, so one can start the program simply by typing "textextract" in any current directory from the command line.


 textextract  [-password:"PDFFilePassword"] [PDFFile2|PDFFolder2]  [-password:"PDFFile2Password"] ... ] /to
 ‹TXTFile|TXTFile1 TXTFile2 ... TXTFileN|TXTFolder›  


PDFFile: The name of .pdf file to convert.

-password: "PDFFilePassword": Optional parameter which specifies the password for last PDFFile.

PDFFolder: The name of the folder containing .pdf files.

/to: The mark of the end of input arguments and the beginning of output arguments.

TXTFile: The name of output text file.

TXTFile1 TXTFile2 ... TXTFileN: Names of text files for the file-to-file conversion.

TXTFolder: The name of folder to save text files.


  • The command-line options are not case sensitive;
  • The "-password" command can only be applied for files, not for folders;
  • In the file-to-file conversion mode the number of input .pdf files must coincide with the number of output text files.


textextract "C:\My PDFs\book.pdf" -password:"pass_for_book" C:\notes.pdf D:\Chapter.pdf/to 
"C:\text\from book.txt" "D:\Folder\from notes.txt" "D:\from Chapter.txt"

In the case of file-to-file conversion, the following result will appear:

book.pdf -> "from book.txt"
notes.pdf-> "from notes.txt"
Chapter.pdf-> "from Chapter.txt"

The password "pass_for_book" is specified for the file "book.pdf".

textextract "C:\My PDFs" D:\Chapter.pdf /to "C:\text\from_folder1.txt" "C:\text\from_folder2.txt" 
"C:\text\from_folder3.txt" "D:\from Chapter.txt"

In this file-to-file conversion, the "My PDFs" folder should contain 3 .pdf files or the conversion process will fail. Use the input from folders in the case of the file-to-file conversion with care.

 textextract "C:\My PDFs" D:\Chapter.pdf /to C:\text\from_all_files.txt 

This example performs text extraction from all input files into the one text file.

textextract "C:\My PDFs" D:\Chapter.pdf /to "C:\text" 

In this example the text extraction from all input files into folder "C:\text" will appear. This folder must exist before the conversion starts. After conversion all converted .txt files will have the same names as their .pdf siblings.



Page top