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);
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)
Thank you for considering Aspose.
I am unable to reproduce this error with latest version of Aspose.Pdf.Kit. Can you please provide me with the PDF and code you are using to add text and images.
The original pdf file that I use is any of these (attached):
The second one has the security setting “filling form: not allowed” (Adobe-> Properties-> Security)
Later, I add text and images as shown in Aspose Programmer’s Guide (using PdfFileMend).
The result (see attached Result.pdf) always present the security settings “filling form: allowed”, eventhough the original pdf file didn’t allow it, and even if I set the privileges as I wrote in my previous post.
Anyway, I have seen other pdf files with “filling form: allowed” that don’t get that pink message bar. Neither the pink icon on left-top of page (Adobe) that replaces the bar after you click on it.
Thanks for your help.
Thanks for considering Aspose.Pdf.Kit.
We noticed both the popup bar and the security setting you mentioned above. However, in my test the pink message bar does not appear.Would you be so kind to provide your code generating the output files?
Thanks & Best regards.
Please view similar problem as explained in