To run PDF Alchemist from the command line, type:
- the program name
- the name of the file
- the name of the output directory where the program will write the output EPUB or HTML and associated files
These are the only required parameters. Quotes are required if there are spaces in the name of the file or in the path name.
The basic command line syntax would look like this:
pdfalchemist filename.pdf c:\export\files
With this example, the output directory is called “export” under C:\Alchemist:
C:\Alchemist\pdfalchemist pathfinder.pdf c:\alchemist\export
The input PDF file does not need to be in the same directory as the program.
The statement might look like this if you add a few command line options to the end of the statement:
pdfalchemist filename.pdf 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.
Place any file names or path names in quotes if the file or path name includes blank spaces:
C:\Alchemist\pdfalchemist "E:\SJonesPDF AlchemistPDF Alchemist test doc.PDF" "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 pathfinder.pdf c:\alchemistexport -keepEmbeddedFonts true
For Linux, the statement would look like this:
./PDFAlchemist pathfinder.pdf ./alchemistexport -keepEmbeddedFonts true
Make sure you include a dash (“-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.