We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Digital signature in PDF

Hi, I am trying to write a PDF document using PDF template. The PDF template has “Signing” set as allowed. The output PDF has “Signing” set as NOT allowed. This is stopping progress in my work as the output pdf has to be digitally sign-able. Please share a sample code snippet if possible.
Please help.Thanks in Advance.

Development team

Hi Linda,

Thanks for contacting support.

While you are creating the PDF document, you can also specify the access privileges (also can enable document signing). For further details, please visit Set Privileges on an Existing PDF File (Facades)


DocumentPrivileges object

DocumentPrivilege privilege = DocumentPrivilege.ForbidAll;

// Sets the change level of document's privilege. Just as the Adobe Professional's

// Changes Allowed settings. 0: None. 1: Inserting, Deleting and Rotating

// pages. 2: Filling in form fields and signing existing signature fields.

// 3: Commenting, filling in form fields, and signing existing signature fields.

// 4: Any except extracting pages.

privilege.ChangeAllowLevel = 2;

//open PDF document

PdfFileSecurity fileSecurity = new PdfFileSecurity();


//set document privileges



Hi I used the below code but no luck. Can you please provide a POC or sample code ?

<!–[if gte mso 9]>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>

DocumentPrivilege privilege = DocumentPrivilege.AllowAll; privilege.ChangeAllowLevel = 4;

privilege.AllowPrint = true;

privilege.AllowCopy = true;

PdfFileSecurity fileSecurity = new PdfFileSecurity(wordDocument); fileSecurity.SetPrivilege(privilege); /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}


Hi Linda,

Thanks for sharing the details.

have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-36936. We will
investigate this issue in details and will keep you updated on the status of a
correction. <o:p></o:p>

We apologize for your inconvenience.


Could you please try using Aspose.PDF for .NET 21.8 and let us know in case you still notice any issues? We tested using the latest version and did not notice any issue.