I have used Aspose.Pdf.Kit 2.3.0 to add text and images to a blank PDF. The result PDF is only for reading and printing.
When the PDF is opened, an undesired pink bar on top of the page appears saying "Please fill out the following form. You cannot save data typed into this form..."
I tried this code (and variations of it) to get rid of that message...
DocumentPrivilege privilege = DocumentPrivilege.ForbidAll;
privilege.PrintAllowLevel = 2;
MemoryStream pdfWithPrivileges = new MemoryStream();
PdfFileSecurity fileSecurity = new PdfFileSecurity(Pdf, pdfWithPrivileges);
fileSecurity.SetPrivilege(privilege);
Pdf = pdfWithPrivileges; // <--- the result
...but it didn't affect. Other PDF files with same privileges (i.e., Filling Form allowed) don't get that message when opened.
How can I avoid that bar to appear? (our clients don't want it since it is not really a form)
When the PDF is opened, an undesired pink bar on top of the page appears saying "Please fill out the following form. You cannot save data typed into this form..."
I tried this code (and variations of it) to get rid of that message...
DocumentPrivilege privilege = DocumentPrivilege.ForbidAll;
privilege.PrintAllowLevel = 2;
MemoryStream pdfWithPrivileges = new MemoryStream();
PdfFileSecurity fileSecurity = new PdfFileSecurity(Pdf, pdfWithPrivileges);
fileSecurity.SetPrivilege(privilege);
Pdf = pdfWithPrivileges; // <--- the result
...but it didn't affect. Other PDF files with same privileges (i.e., Filling Form allowed) don't get that message when opened.
How can I avoid that bar to appear? (our clients don't want it since it is not really a form)