How to retrieve document assembly and signing properties of a PDF

Hi,

We are trying to retrieve below properties of a PDF document.

Document Assembly and Signing, we are trying to get values as shown in attached image.

MicrosoftTeams-image (1).png (30.3 KB)

And code snippet for the same,
Document assembly:
PdfFileInfo fileInfo = new PdfFileInfo(filepath);
fileInfo.BindPdf(filepath);
Aspose.Pdf.Facades.DocumentPrivilege privilege = fileInfo.GetDocumentPrivilege();
PDFProperities.DocumentAssemblyPermitted = (Convert.ToString(privilege.AllowAssembly) == “True”) ? “Yes” : “No”;
PDFProperities.DocumentPermitsPrinting = (Convert.ToString(privilege.AllowPrint) == “True”) ? “Yes” : “No”;

Signing:
PdfFileSignature pdfSign = new PdfFileSignature();
pdfSign.BindPdf(filepath);
PDFProperities.SigningPermitted = pdfSign.ContainsSignature() ? “Yes” : “No”;
pdfSign.Close();

But these code always returning false even though it was allowed in PDF document.

Kindly help us how we can retrieve the same.

@prnksheela

Would you please make sure that you are using 23.7 version of the API and in case issue is still happening, please share your sample PDF with us so that we can test the scenario in our environment and address it accordingly.

Please find the PDF - annotationsampletest.pdf (36.6 KB)

@prnksheela

Can you please share which version of the API are you using? We tested using 23.7 and we received below values in our environment:

DocumentAssemblyPermitted = "Yes";
DocumentPermitsPrinting = "Yes";
SigningPermitted = "No";

The document is enabled for signing but you are also getting “No”. We are using 22.8.

Could you please share the sample snippet that you are trying?

@prnksheela

We have used the same code snippet that you shared with us. Only difference was the API version. Regarding signature verifications, yes, we will surely look into it. Can you please try testing with 23.7 and share your feedback with us? We will log an investigation ticket and share the ID with you.

we have checked with version - 23.12 as well, and we are getting same issue.

@prnksheela

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-56864

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.