The following are a few examples of the usage of the PDF2XL CLI Command Line Interface.
Note that you must run these commands from the installation folder of PDF2XL, or otherwise provide a full path to the application.
To open one or more files using PDF2XL CLI's command line, just specify the filename(s).
This will open a single file:
This will open the two specified files:
PDF2XL "c:\some documents\data.pdf" "c:\some documents\more data.pdf"
Note that if the file path contains a space, you will need to use quotes around the path.
You can also use the input command to open the file. The following command is similar to the previous example:
PDF2XL -input="c:\some documents\data.pdf" -input="c:\some documents\more data.pdf"
Another option is to change the initial structure type of a document (providing you haven't opened it yet) by setting it in the command line:
PDF2XL -template="repeat" -pagerepeat=3 -firstpagediff -input="c:\some documents\new data.pdf"
This will open the indicated file automatically, using the layout found in the a_"quoted"_layout file:
PDF2XL -input="c:\my documents\my pdf.pdf" -layout="c:\layouts\a_""quoted""_layout"
This will run a clipboard conversion on the c:\input.pdf file using the layout found at c:\def_layout.layout, converting the 1st-3rd and 5th-8th pages:
PDF2XL -noui -input="c:\input.pdf" -format=clipboard -range="1-3,5-8" -layout="c:\def_layout.layoutx" 2> c:\error.log
Note that if an error occurs, a detailed message will be found in the file c:\error.log
Sometimes it's easier to test the parameters you provide to the command line when running with a full UI. To do that, replace the -noui command with -run -autoclose (and of course, the error redirection is not required):
PDF2XL -run -autoclose -input="c:\input.pdf" -format=clipboard -range="1-3,5-8" -layout="c:\def_layout.layoutx"
This will convert all the PDF files inside C:\InputFolder into similarly named Excel files and put them in C:\OutputFolder:
for /F "delims=." %%g in ('dir /b C:\InputFolder\*.pdf') do PDF2XL -input="C:\InputFolder\%%g.pdf" -layout="C:\LayoutsFolder\TheLayout.layoutx" -format=excelfile -range=all -output="C:\OutputFolder\%%g.xls" -noui -autoopen=off
Note that quotes are only needed when there is a space in the path.
...needs quotations around it because of the space between Input and Folder, but: