To operate via the command line, pass command line arguments to SPViewer.exe (the executable file of this product).
This topic explains the command line arguments and exit codes for SPViewer.exe, and the settings applied when executing commands.
Note that SPViewer.exe is located in the installation folder of this product.
In case of a 32-bit OS | C:\Program Files\SKYCOM\SkyPDF 8 |
---|---|
In case of a 64-bit OS | C:\Program Files (x86)\SKYCOM\SkyPDF 8 |
In this help guide, switches are denoted with "/" (slash), but they can also be specified with "-" (hyphen).
Opens the specified PDF with this product.
SPViewer.exe <input file path> [/w]
Switches and Parameters
<input file path> | [Required] Full path of the PDF to be opened with this product. (Example) SPViewer.exe "C:\sample\Sample.pdf" |
---|---|
/w | [Option] Open in a separate window (Example) SPViewer.exe "C:\sample\Sample.pdf" /w |
Exit Codes
0 | Normal termination |
---|---|
1 | Normal termination |
-1 | Invalid parameter |
Prints the specified PDF using the printer set as the default printer in the OS.
SPViewer.exe /p <input file path>
Switches and Parameters
/p <input file path> | [Required] Prints the specified PDF. (Example) SPViewer.exe /p "C:\sample\Sample.pdf" |
---|
Settings
Printer | Uses the printer set as the “default printer” in the OS. |
---|---|
Print Range | All pages |
Number of Prints | One copy |
Paper Size | Prints by enlarging or reducing the PDF content to fit the paper size set in the printer. |
Print Mode | Follows the print mode settings in the [Print Settings] tab in preferences. |
Resolution | Follows the print quality (rendering resolution) settings in the [Print Settings] tab in preferences. |
Exit Codes
0 | Normal termination |
---|---|
1 | Normal termination |
-1 | No file specified |
-2 | Error |
Creates a PDF by reading a paper document using the specified scanner.
SPViewer.exe <output file path> /scan
Switches and Parameters
<output file path> | [Required] Full path of the output destination for the PDF created after scanning. (Example) "C:\sample\Sample.pdf" |
---|---|
/scan | [Required] Reads a paper document using a scanner. |
Settings
Various settings follow the settings of the scanner being used.
Exit Codes
0 | Normal termination |
---|---|
-1 | No file specified Edition not supporting scanner function Cancellation of scanner selection screen |
-2 | Cancellation of scanner driver screen |
-3 | Error |
Applies a signature to the specified PDF.
When applying a signature via the command line, various settings must be made in advance in the Preferences of this product.
SPViewer.exe <input file path> /sig /out <output file path> [/ltv] [/page <page number>] [/pos "<sx>,<sy>,<ex>,<ey>"] [/pwd <password>]
Switches and Parameters
<input file path> | [Required] Path of the PDF to which the signature is applied. (Example) “C:\sample\Sample.pdf” |
---|---|
/sig | [Required] Applies a signature to the specified PDF. |
/out <出力ファイルパス> | [Required] Output path for the signed PDF. (Up to 512 characters) Duplication with <input file path> is not allowed. (Example) /out “C:\sample\Sample_sig.pdf” |
/ltv | [Option] If the signature format of “Format to be used for command line signing” is “PKCS#7 Profile(PAdES-Basic)” or “CAdES Profile(PAdES-Enhanced)”, a document timestamp is applied after signing. |
/page <page number> | [Option] Applies a signature to the specified page. If not specified, it is applied to the first page. Invisible signatures cannot be specified (applied to the entire file). (Example) /page 3 |
/pos "<sx>,<sy>,<ex>,<ey>" | [Option] Specifies the upper left and lower right coordinates based on the upper left of the page for the placement of the signature. (Unit: point) If not specified, it is applied as an invisible signature. (Example) /pos “10,10,100,100” |
/pwd <password> | [Option] If password security is set for the PDF specified by <input file path>, specify the password with signature application authority. (Example) /pwd “password” |
Settings
When applying a signature via the command line, various settings must be made in advance in the Preferences of this product.
Please check the various settings explained below and set them as necessary.
Method | The setting is ignored (always treated as [SKYCOM Standard Signature]). |
---|---|
Invisibility | The setting is ignored (arguments take precedence). |
Always used | The setting is ignored. |
Default certificate | [Required] Select [File] or [Certificate Store/IC Card] and set the certificate to be used from [Certificate settings]. It is treated as insufficient setting when [JPKI] is selected. |
Signature format | The Signature format of “The format that is used to sign the document” is ignored. The Signature format of “Format to be used for command line signing” is applied. |
Include a signature timestamp in signature data | If the Signature format is “PKCS#7 Profile(Standard Signature)”: The setting is ignored (always off). If the Signature format is “PKCS#7 Profile(PAdES-Basic)”: Follow the setting. |
Include verification information | If the Signature format is “PKCS#7 Profile(Standard Signature)”: The setting is ignored (always off). - Out of signature data: The setting is ignored (Not included). - Within signature data: Follow the setting. |
Add verification information for all signatures when saving PDF | Follow the setting. |
Timestamp to be used | Follow the setting. |
Signatories to be used | Follow the setting. |
Reason | Follow the setting. |
Location | Follow the setting. |
Setting of graphic | Follow the setting. |
---|---|
Setting of text | Follow the setting. |
Exit Codes
0 | Normal termination |
---|---|
-1 | Invalid parameter No file specified Input file and output file are the same |
-100 | Edition not supporting signature function |
-101 | Setting error |
-102 | There is an error in the setting content. |
-200 | Invalid page number |
-201 | PDF open error |
-202 | PAdES error |
-203 | There is no timestamp to extend. |
-204 | Save error |
-205 | Insufficient size |
-206 | Invalid file |
-208 | Insufficient settings |
-209 | A signature cannot be added because security is set. |
-299 | Other errors |
Stamps a PDF seal on the specified PDF.
When stamping a PDF seal via the command line, the PDF seal file to be used must be set in advance in the [Option] in the “PDF Seal” group of the [Signature/Seal] menu of this product.
SPViewer.exe <input file path> /pdfseal [/page <page number>] [/pos "<sx>,<sy>"] [/pwd <password>] [/out <output file path>]
Switches and Parameters
<input file path> | [Required] Path of the PDF to be stamped with the PDF seal. (Example) “C:\sample\Sample.pdf” |
---|---|
/pdfseal | [Required] Stamps a PDF seal on the specified PDF. |
/page <page number> | [Option] Stamps a PDF seal on the specified page. If not specified, it is stamped on the first page. (Example) /page 3 |
/pos “<sx>,<sy>” | [Option] Specifies the upper left coordinates based on the upper left of the page for the placement of the seal impression. (Unit: point) If not specified, it is placed at the upper left of the page (0,0). (Example) /pos “100,100” |
/pwd <password> | [Option] If password security is set for the PDF specified by <input file path>, specify the password with editing authority. (Example) /pwd “password” |
/out <output file path> | [Option] Output path for the stamped PDF. (Up to 512 characters) (Example) /out “C:\sample\Sample_sig.pdf” |
Settings
This function uses the PDF seal settings used by the command line execution user of this product.
Therefore, the following must be set in advance in the [PDF Seal Settings] of this product.
Exit Codes
0 | Normal termination |
---|---|
-1 | No file specified |
-100 | Edition not supporting PDF seal function |
-101 | Error in obtaining PDF seal setting information |
-102 | Invalid password |
-200 | Invalid page number |
-201 | PDF open error |
-202 | Error because self-signature input is required at the time of stamping |
-203 | Error because image input is required at the time of stamping |
-204 | Cannot stamp because security is set |
-299 | Other errors |
You can add the specified file as an embedded file annotation to the specified PDF.
SPViewer.exe <input file path> /embed <embedding file path> [/pwd <password>] [/out <output file path>]
Switches and Parameters
<input file path> | [Required] Path of the PDF to which the file embedding is applied. (Example) “C:\sample\Sample.pdf” |
---|---|
/embed <embedding file path> | [Required] Applies the specified embedded file. (Example) /embed “C:\sample\sample.txt” |
/pwd <password> | [Option] If password security is set for the PDF specified by <input file path>, specify the password with editing authority. (Example) /pwd “password” |
/out <output file path> | [Option] Output path for the PDF after file embedding. (Up to 512 characters) If not specified, it will be overwritten on the PDF specified by <input file path>. |
Settings
When applying an embedded file via the command line, the operation may be affected by the settings in the [Embedded File] tab of the Preferences.
Embedding thumbnail Image | - |
---|---|
![]() |
Follow the setting. |
![]() |
Follow the setting. |
![]() |
Becomes -101 (embedding error). |
![]() |
Becomes -101 (embedding error). |
Magnification ratio | The setting is ignored. |
Attached file tab display mode | The setting does not affect the operation. |
Behavior of PDF/A Standard
If a PDF/A file is specified for <input file path>, the PDF/A attribute may be removed after command line execution depending on the standard.
PDF Standard of <input file path> | Standard After File Embedding |
---|---|
PDF/A-1b | PDF/A attribute is removed |
PDF/A-2a | PDF/A attribute is removed |
PDF/A-2b | PDF/A-3b |
PDF/A-2u | PDF/A attribute is removed |
PDF/A-3a | PDF/A-3a |
PDF/A-3b | PDF/A-3b |
PDF/A-3u | PDF/A-3u |
PDF/A-4 | PDF/A-4f |
PDF/A-4f | PDF/A-4f |
PDF/A-4e | PDF/A-4e |
Exit Codes
0 | Normal termination |
---|---|
-1 | Invalid parameter No file specified File not supported by file embedding function |
-100 | Invalid edition Edition not supporting file embedding function |
-101 | Setting error |
-200 | Invalid password |
-201 | Cannot open PDF file |
-202 | File embedding error |
-203 | Cannot save PDF file |
-204 | Cannot embed file because security is set on PDF. |
-205 | File does not exist in embedding file path. |
-299 | Other errors |