10-2 How to Specify Input and Output

Many of "Antenna House PDF API" Command-lines require input and output files to be specified. This section explains how to specify files one by one and how to specify folders all at once.

10-2-1 Specifying Files

Specify the input and output files by file path. This setting can be used with all commands. Specify the input file path with -d and the output file path with -o.

[Specifying files]

-d <input file path> [password] -o <output file path>

[Detail information: -d]

-d <input file path> [password]

Specify the input file path with -d.

  • It is also possible to process input files with password security.
  • If the input file has password security, please specify the password string.
  • If the input file has two types of passwords: a password to open the document and an owner password, specify the owner password.
Notes/Supplements for -d:

[Detail information: -o]

-o <output file path>

Specify the output file path with -o.

Notes/Supplements for -o:
  • If the file path contains spaces, enclose the file path in double quotation marks (").
  • For commands that do not involve output, it is not necessary to specify the output file path. (Example: -getFileInfo Get PDF information) see the specifications of associated command described in "Chapter.12 Parameters for Commands" in this manual for whether or not it is necessary to specify the output file path.
  • For the output destination, specify a path to an existing folder. If the path is not found, an error will occur.

[Specific example of settings]

Load test1.pdf, execute the processing specified in <command> [parameter], and output it as out.pdf.

  • The password of the input file is "ownerpass".
<Windows>

AHPDFToolCmd80.exe <command> [parameter] -d "c:\test\test1.pdf" ownerpass -o c:\sav\out.pdf

<Linux>

AHPDFToolCmd80 <command> [parameter] -d "/home/antenna/test/test1.pdf" ownerpass -o /home/antenna/sav/out.pdf

10-2-2 Specifying Folder

You can specify the input/output destination using a folder path. Whether or not a folder can be specified and the operation contents differ depending on the command. Specify the input folder path with -d and the output folder path with -o.

[Specifying folders]

-d <input folder path> [password] -o <output folder path>

[Detail information: -d]

-d <input folder path> [password]

Specify the input file path with -d.
It is also possible to process input files with password security. If the input file has password security, please specify the password string. If the input file has two types of passwords: a password to open the document and an owner password, specify the owner password.

Notes/Supplements for -d:
  • The basic limitations are the same as for specifying files.
  • If the file path contains spaces, enclose the file path in double quotation marks (").
  • Files in the specified input folder will be processed. Files in subfolders are not processed.
  • If the folder contains input files that are secured with different passwords, an error will occur for input PDFs with passwords other than the specified one.
  • Multiple passwords cannot be specified when specifying a folder.
  • The behavior when specifying a folder and the type of input file (PDF, image, etc.) differ depending on the command. For detailed operations when specifying a folder, see the setting of associated command described in "Chapter.12 Parameters for Commands" in this manual.
  • If you specify a folder for processing, you cannot specify multiple commands.
    For details on specifying multiple commands, see "14-1 Specifying Multiple Commands" in this manual.
  • Some commands do not support specifying folder.
    See "Chapter.11 Type of Commands" in this manual for a list of whether folders can be specified. Alternatively, see the setting of associated command described in "Chapter.12 Parameters for Commands" in this manual.

[Detail information: -o]

-o (output file path)

Specify the output file path with -o.

Notes/Supplements for -o:
  • The basic limitations are the same as for specifying files
  • If the file path contains spaces, enclose the file path in double quotation marks (").
  • For commands that do not involve output, it is not necessary to specify the output file path. (Example: -getFileInfo Get PDF information) See the specifications of associated command described in "Chapter.12 Parameters for Commands" in this manual for whether or not it is necessary to specify the output file path.
  • For the output destination, specify a path to an existing folder. If the path is not found, an error will occur.
  • The behavior when specifying a folder and the type of output file (PDF, image, etc.) differ depending on the command.
    For detailed operations when specifying a folder, see the setting of associated command described in "Chapter.12 Parameters for Commands" in this manual.
  • If you specify a folder for processing, you cannot specify multiple commands. For details on specifying multiple commands, see "14-1 Specifying Multiple Commands" in this manual.
  • Some commands do not support specifying folder.
    See "Chapter.11 Type of Commands" in this manual for a list of whether folders can be specified. Alternatively, see the setting of associated command described in "Chapter.12 Parameters for Commands" in this manual.

[Specific example of settings]

Execute the processing specified in <command> [parameter] using the files in the "in 2" folder as processing targets, and output the files to the "out" folder.

  • At this time, the password of the input file is "ownerpass".
<Windows>

AHPDFToolCmd80.exe <command> [parameter] -d "c:\in 2" ownerpass -o c:\out -linearize

<Linux >

AHPDFToolCmd80 <command> [parameter] -d "/home/antenna/in 2" ownerpass -o /home/antenna/out -linearize

Please enter alt text.