/addSignatureField

Determines, previous to signature, the location and the size of the signature field within the document.

By command line:

csa -addsignaturefield -fieldname "Signature1" -fieldpage "last" -fieldx "70.0" -fieldy "90.0" -fieldwidth "100.0"
-fieldheight "100.0" -in c:/in.pdf -out c:/out.pdf

-ConsignO® Server uses the term "units" as a unit length. 1 unit = 1 /72". Origin is in the top left corner of the document. To define the location of a signature zone:

  • Convert your PDF document size in units. Ex.: A 8.5" x 11" (letter format) will be 612 x 792 units.
  • Based on the location of the zone, derive the right coordinates for the top left corner of the zone.
post

/listDevices

This function will list all the available devices along with the available certificates on the machine to which the request is sent. The device type must be mscapi. For mscapi device type, the device value must be all.

This funtion would be used as a previous step to /signPDF to retrieve the device id from the listed devices.

By command line:

csa -listdevices -devicetype mscapi -device all
post

/signPDF

Digitally signs a PDF document. The signature can be invisible or visible (Assigning an image to a field/zone on the document).

By command line:

-When using a personal Certificate (CertifiO Pro/Employee), use MSCAPi as a device type. To retrieve the certificate device ID, use /listdevices previously.

csa -signpdf -device "de2712" -devicetype mscapi -password -in c:/tmp/vide.pdf -out c:/tmp/signed.pdf -reason "I am the author" -fieldname "Signature1" -img "c:/tmp/image.png"

-When using an organizational Certificate (CertifiO Org), use H2 as a device type.

csa -signpdf -device "http://hh1.notarius.com/hh1-ca1/notarius-test/api/v1" -devicetype "h2" -password -in "C:/tmp/field_1.pdf" -out "c:/tmp/signed.pdf" -reason "I approve"" -img "C:/tmp/image.png"

If the document has a signature field (fielname), its content can be made of:

  • Image
  • CustomText
  • Image + customText

By command line:

csa -signpdf -device "http://hh1.notarius.com/hh1-ca1/notarius-test/api/v1" -devicetype "h2" -password -in "C:/tmp/field_1.pdf" -out "c:/tmp/signed.pdf" -reason "I approve"" -img "C:/tmp/image.png" -customtext "Information is certified by {crlf} {cn} to be accurate on {date, yyyy-MM-dd HH:mm}." -haligntext "CENTER" -valigntext "MIDDLE"
post

/applyTemplate

Applies a ConsignO® Desktop template to a PDF. A template is a descriptor of one or more signature fields. This is used when signature fields placement are predictable. Templates should be in XML format.

By command line:

csa -applytemplate -in pdffile.pdf -out c:/tmp/pdffile_w_zone.pdf
-template "c:/tmp/template.xml"
post

/stampingPDF

This function is used to apply a stamp to the document. A stamp is simply an image that is applied to the document without digitally signing it.

By command line:

csa -stamp -in c:/tmp/consigno-sdk/vide_with_zone.pdf -out c:/tmp/consigno-sdk/stamped.pdf -fieldname "Field1" -img "c:/tmp/image.png"
post

/pdfMetadata

Retrieves some basic information about a PDF document, like:

  • Number and size of pages
  • Signatures
  • Unsigned signature fields
  • PDF/A claimed level

This operation is not costly as no extensive validation of signatures or PDF/A conformity is done.

By command line:

csa -pdfmetadata -in c:/tmp/myfile.pdf
post

/validatePDF

Complete validation of all the signatures appearing on the document. Validation of a signature is based on 3 sub-validations:

  • Integrity (was the document modified after signature ?)
  • Origin (signed by a trusted signer at signature time or custom date ?)
  • Time (issued by certified timestamp authority or taken from local machine ?)

Every signature on a document contains a result for each of these aspect. The global document result (document authenticity) ie equals to the worse result appearing in the document.

By command line:

csa -validatepdf -in c:/tmp/myfile.pdf
post

/convertToPDFA

Converts a document to PDF/A using the level passed as parameter.

By command line:

csa -converttopdfa -level PDF/A-1b -in c:/tmp/myfile.pdf -out "c:/tmp/converted.pdf" -flatten true
post

/validatePDFA

Verifies that a PDF/A document complies to the claimed level included in the document. This function cannot be used to verify conformance for a level different than the one present in the document.

By command line:

csa -validatepdfa -in c:/tmp/myfile.pdf
post

/fillForm

Fills the value of a field in a PDF form.

By command line:

csa -fillform -in pdffile.pdf -out c:/tmp/filled.pdf
-fieldvalues "fieldname1:value1" "fieldname2:value2"
post

/applyTimestamp

This function is used to timestamp a PDF document. Timestamping is an additional service offered by Notarius that provides a document with a standard time (not the signer's desktop time) and includes a private key as unique fingerprint.

By command line:

csa -applytimestamp -tsaendpoint https://timestamp-sandbox1.certifio.com/tsa/testtsa01 -in "c:/tmp/consigno-sdk/signed.pdf" -out "c:/tmp/consigno-sdk/timestamped.pdf"
post

/upgradeLTV

Upgrade to Long-Term Validation, this function is used to collect all available revocation information, embed to DSS and apply a timestamp.

By command line:

csa -upgradeltv -in C:/tmp/signed_not_ltv.pdf -tsaendpoint https://timestamp-sandbox1.certifio.com/tsa/testtsa01
-out C:/tmp/upgradedToLtv.pdf
post

/addEmbeddedFiles

Adds one or more files to the PDF, as attached files.

By command line:

csa -addembeddedfiles -in pdffile.pdf -out c:/tmp/pdffile_w_files.pdf
-files "c:/tmp/data1.xml" "c:/tmp/data2.xml"
post

/listEmbeddedFiles

This function will list the files that are currently embedded in a PDF.

By command line:

csa -listembeddedfiles -in "c:/pdffile.pdf"
post

/removeEmbeddedFiles

This function removes embedded files from a PDF

By command line:

csa -removeembeddedfiles -in "c:/file1.pdf" -out "c:/file2.pdf"
post

/prepareExtSignPDF

An external signature is a signature which is done in a different time/place than where the document resides. For example, a document could be prepared on the server-side, and only a small data structure could be sent to the client-side for signature. This method is bandwidth-effective, as the full document does not travel to the client-side to be signed.

An external signature has 3 steps:

  1. Preparation step using /prepareExtSignPDF
  • Prepare document to be signed using the signature certificate.
  • Generate data structure to be signed and retrive the proceesID, dataToSign and algorithm fields from the response, in order to be used in the next steps.
  1. Signature step using /signatures
  • This step can be done at a different time/place than where the preparation step occured. Typically, the data structure is sent client-side, where the digital signature private key resides.
  • Option 1; this step can be done with any technology supporting RSA digital signature. The algorithm that needs to be used is called PKCS#1 v1.5 (NoneWithRSA in Java).
  • Option 2; use the /signatures in the CFM API. For details on its use when Externally Signing, go see the CFM API documentation. Take note that this is a different API ressource to /signPDF
  1. Finalization step using /finalizeExtSignPDF
  • The resulting signature is embedded in the document prepared in the previous preparation step.

By command line:

csa -prepareextsignpdf -in c:/tmp/myfile.pdf -certificate "c:/tmp/certificate.cer"
-reason "I am the author" -fieldname "Signature1" -img "c:/tmp/image.png"
post

/finalizeExtSignPDF

Finalizes a document signature. See /prepareExtSignPDF for details on what happens.

By command line:

csa -finalizeextsignpdf -processid 6b50d524-4a6d-4b39-a84a-f57195641b7c
-in base64EncodedRawSignature -out c:/tmp/signed.pdf
post

/prepareExtSignCMS

Similar to an external PDF signature, but CMS-based. See /prepareExtSignPDF for further explanations.

By command line:

csa -prepareextsigncms -in c:/tmp/myfile.doc -certificate c:/tmp/certificate.cer -algorithm SHA-256
post

/signCMSDetached

A CMS signature (Cryptographic Message Syntax) allows signing of any data formats. In a detached mode, the resulting signature is saved in a separate file (.p7s). The signed document is never modified in the process.

By command line:

csa -signcmsdetached -device "de2712" -devicetype mscapi -password -in "c:/tmp/consigno-sdk/vide.pdf" -out "c:/tmp/consigno-sdk/signature_file.p7s"
This operation is currently unsupported as a web service call.

/signCMSEnveloped

A CMS signature (Cryptographic Message Syntax) allows signing of any data formats. In an enveloped mode, the resulting file (.p7m) includes both the signature and the original document. The signed document is never modified in the process.

By command line:

csa -signcmsEnveloped -device "de2712" -devicetype mscapi -password -in "c:/tmp/myfile.doc" -out "c:/tmp/signature_file.p7s"
This operation is currently unsupported as a web service call.

/finalizeExtSignCMS

Similar to an external PDF signature, but CMS-based. See /finalizeExtSignPDF for further explanations.

By command line:

csa -finalizeextsigncms -processid 6b50d524-4a6d-4b39-a84a-f57195641b7c
-in base64EncodedRawSignature -out c:/tmp/signed.p7m -encapsulate true
post

/validateCMS

Complete validation of all CMS signatures of a document. Both encapsulated and not encapsulated (external) signatures are supported. Validation of a CMS signatures is based on 2 sub-validations:

  • Integrity (was the document modified after signature ?)
  • Origin (signed by a trusted signer at signature time or custom date ?) Every signatures on a document contains a result for each of these aspect.

By command line:

csa -validatecms -in c:/tmp/file.xml -sig c:/tmp/file.xml.sig1,c:/tmp/file.xml.sig2
post