Please enable JavaScript to view this site.

Navigation: Developer Information > Command Line Interface

Command Line PDF Sign With Certificate

Scroll Prev Top Next More

Sign PDF With Certificate Command Line Format win2pdf-pro-feature


win2pdfd.exe sign          "sourcepdf" "destpdf" "certfile" "certpassword"

win2pdfd.exe sign          "sourcepdf" "destpdf" "certfile" "certpassword" "masterpassword"

win2pdfd.exe sign          "sourcepdf" "destpdf" "certfile" "certpassword" "masterpassword" "reason" "location" "contactinfo"

win2pdfd.exe signwithstamp "sourcepdf" "destpdf" "certfile" "certpassword" "masterpassword" "x" "y" "width" "height"

win2pdfd.exe signwithstamp "sourcepdf" "destpdf" "certfile" "certpassword" "masterpassword" "x" "y" "width" "height" "reason" "location" "contactinfo" 


Signs the PDF specified by "sourcepdf" and saves signed PDF to "destpdf" using the digital certificate file and password specified by "certfile" and "certpassword".  The "certfile" must be a PKCS#12 certificate (.pfx or .p12 file) issued by a valid Certificate Authority (CA). Adobe Acrobat Reader only recognizes some Certificate Authorities and some Certificate Policies without displaying a warning, but it's possible to manually mark a certificate as "trusted" for other types of certificates.


If the "sourcepdf" is encrypted, provide the PDF master password in "masterpassword".  Otherwise, set to "".


If the optional "reason", "location", and "contactinfo" parameters are included, they will update the signature properties.


The "signwithstamp" variation adds a visible signature field with the signature properties displayed within the field.  The "x" parameter specifies the horizontal position of the signature field from the left side of the page in points (1/72 inch).  The "y" parameter specifies the vertical position of the signature field from the top of the page in points.  The "width" and "height" parameters specify the width and height of the signature field in points. The signature field is always applied to the first page of the PDF.


This feature requires a licensed version of Win2PDF Pro. Contact us for a time limited evaluation license.


If "sourcefile" and "destfile" are the same file, the file is modified in place.


Any file names that contain spaces must be enclosed with quotation marks. The "sourcepdf" can be a local file path, or an web address (URL) to an existing PDF.


Returns 0 on success, and a Windows system error code on failure.