PDF2XL CLI Commands

To pass a command into PDF2XL CLI, prefix it with a minus sign ('-'), otherwise it will be treated as a filename (i.e., PDF2XL CLI will try to open a file in that name).

Each command will appear after a space, and if it has a value, it will be separated from it using an equal sign. If the value contains spaces, it MUST start and end with quotes, which will be removed from the value itself. If a quoted value has a quote inside, it needs to be doubled. See the CLI Examples for samples on the usage of the commands and quotes.

PDF2XL CLI will return an error code if there was a problem with the command line. 

Command Value Description Notes
-input Loads the file. Can appear more than once, unless the Silent Mode command is used, in which case it must appear exactly once. If a filename appears in the command line without any flag, it will be used as input.
-layout Loads a layout from the file. Will be used on all the input flag files; overrides the layout saved for the input file (if any).
-format excel
excelfile
word
wordfile
powerpoint
powerpointfile
calcfile
csvfile
clipboard
excelclipboard
wordclipboard
html
Sets the current conversion format. Overrides the saved setting.
-output Sets the output filename. Does not apply to formats without a file (clipboard, excelclipboard, wordclipboard). Only valid when format appears and is set to excelfile, wordfile or csvfile.
-range all
current
ask
<num>[-<num>][,<num>[-<num>]]...
Sets the conversion page range. Isn't valid if the document is a Scanned PDF Document.
-noui Runs the application in Silent Mode. Command line has to include input; will fail if no layout is defined for the file, or if converting to a file without an output file, or if the page range is set to current.
-autoclose Closes the file when it is converted; closes the application when the last file is converted. When the -noui command is used, this command is applied automatically. 
-run Converts the opened document immediately. Command line must include input; will fail if no layout is defined for the file, or if converting to a file without an output file, or if the page range is set to current. When the -noui command is used, this command is applied automatically. .
-autoopen on
off
If set to on, will open the Excel or Word file when the conversion is finished. If set to off, will not display the file. If not specified, PDF2XL CLI will use the Open File after Conversion setting in the Conversion Settings page. Valid only in combination with Silent Mode command.
-autolayout Will automatically create a layout for each file (just like using the automatic layout detection in the Layout ribbon). Valid only if no layout is specified (i.e., do not use the -layout command).
-existingfile replace
newsheets
append
Set the handling of converting to an existing file (Excel only). Overrides the saved setting
-template same
different
repeat
Set the structure type for the document. Overrides the saved setting.
-pagerepeat Set the number of pages per repetition, for a repeating template. This option must appear if, and only if, the -template repeat option was used.
-firstpagediff Set the First Page Different option, identical to the one in the Document Template dialog. This means that the first page does not repeat the layout in the same way as the rest of the document. Overrides the saved setting.
-lastpagediff Set the Last Page Different option, identical to the one in the Document Template dialog. This means that the last page does not repeat the layout in the same way as the rest of the document. Overrides the saved setting.

Still need help? Contact Us Contact Us