14–1 Specifying Multiple Commands
Multiple commands can be specified simultaneously on the command line.
- However, there are the following points to note when specifying multiple commands at the same time:
- If a folder is specified as the processing target, multiple commands cannot be specified.
- Commands to obtain information, convert image files to PDF, PDF/A conversion commands, PDF/A compliance validation commands, and file split commands will not work even if specified.
- If an error occurs, the Command-line exits without saving.
- For watermark commands "-setPdfWatermark/-setImageWatermark/-setTextWatermark/-setColorWatermark", if multiple types are specified at the same time, only the first watermark that appears on the command will be processed.
- "-pageDelete" and "-insertEmptyPage" cannot be called multiple times within one command setting.
- Also, the order in which the commands are specified is arbitrary, but the order in which they are executed is as follows.
- -decrypt
- -mergeFiles
- -changeDocInfo
- -pageRotate
- -pageDelete
- -insertEmptyPage
- -changeViewInfo
- -setPdfWatermark/-setImageWatermark/-setTextWatermark/-setColorWatermark
- -writeText
- -addPageNumber
- -addEmbeddedFile
- -exportAnnotsToFDF
- -importAnnotsFromPDF
- -optimize
- -encrypt
- -pageExtract
- -embedFonts
- -extractImage
- -extractText
- -extractEmbeddedFile
- -importAnnnotsFormFDF
14–1–1 Example of commands
[Executing example commands]
When you run the example below, the order of descriptions is "-encrypt", "-changeViewInfo", and "-setTextWatermark". The actual processing order is "-changeViewInfo", "-setTextWatermark", and "-encrypt".
[Windows]
AHPDFToolCmd80.exe -encrypt -ownerPass test -filterType 4 -perms2 -print 1 -modify 0 -changeViewInfo -pageLayout 2 -setTextWatermark -text sample -colorText 1 0 0 -diagonal -font -name Meiryo -size 72 -d C:\test \test.pdf -o C:\sav\out.pdf
[Linux]
AHPDFToolCmd80 -encrypt -ownerPass test -filterType 4 -perms2 -print 1 -modify 0 -changeViewInfo -pageLayout 2 -setTextWatermark -text sample -colorText 1 0 0 -diagonal -font -name ipa-gothic -size 72 -d /home/antenna /test/test.pdf -o /home/antenna/sav/out.pdf