PDF Alchemist

Command Line Syntax

To run PDF Alchemist from the command line, type:

  1. the program name
  2. the name of the file
  3. the name of the output directory where the program will write the output EPUB or HTML and associated files

Quotes are required if there are spaces in the name of the file or in the path name.

The program name and file name are required. We recommend that you also provide the name of the output directory in your command line statement. If you don’t include the name of the directory to store the output file, the software will create a directory for you and store the output file there.  The new output directory will be named to match the name of your input file, and it will be created under the working directory, where the pdfalchemist.exe program file is found.

The basic command line syntax would look like this:

pdfalchemist --inputFile filename.pdf --outputDirectory c:\export\files

The former syntax, without using the inputFile and outputDirectory options, is still supported.

With this example, the input file name is called “pathfinder.pdf” and the output directory is called "export" under C:\Alchemist:

C:\Alchemist\pdfalchemist --inputFile pathfinder.pdf --outputDirectory c:\alchemist\export

The input PDF file does not need to be in the same directory as the program.

The default behavior of PDF Alchemist is to generate HTML output into the output directory.

You can add optional parameters after the input and output location. Type a dash or pair of dashes, followed by the parameter name and the parameter value. Running PDF Alchemist without any parameters will print a summary of program usage to the console.

The statement might look like this if you add a few command line options to the end of the statement:

pdfalchemist --inputFile filename.pdf --outputDirectory c:\export\files --outputFormat xml --tablesonly true

The above command line statement would take the file called filename.pdf and export the content found in tables in that PDF document to an XML output file. Then, it would store that XML file in a folder called C:\export\files.

Note the options –-outputFormat and --tablesonly added to the statement.

Place any file names or path names in quotes if the file or path name includes blank spaces:

C:\Alchemist\pdfalchemist --inputFile "E:\SJonesPDF AlchemistPDF Alchemist test doc.PDF" --outputDirectory "E:\SJonesPDF AlchemistExport files"

Add any optional parameters to the end of the statement, one after the other, with a space in between each parameter. Also include a space between each parameter and the variable ("true"), as in "--keepEmbeddedFonts true".

In this example, the command would convert a PDF document called Pathfinder.PDF to HTML and store the output in a folder called "/export." It will also include references to fonts in the HTML file, so that the HTML file will look for fonts already available on the local machine. It will not export fonts embedded in the PDF source file and then call those fonts from the export directory (we describe "keepEmbeddedFonts" in more detail below). For Windows, use this syntax:

C:\Alchemist\PDFAlchemist --inputFile pathfinder.pdf --outputDirectory c:\alchemistexport --keepEmbeddedFonts true

For Linux, the statement would look like this:

./PDFAlchemist --inputFile pathfinder.pdf --outputDirectory ./alchemistexport --keepEmbeddedFonts true

Make sure you include a pair of dashes ("--keepEmbeddedFonts") in front of each parameter name.

If you simply type this, for Linux:


Or this, for Windows:


The program will display a summary of the command syntax, with a list of the optional parameters. In this case you would not include the name of an input file or of an output directory.