Export to read only PDF
Hi,
In Export to Pdf dialog -> Security -> I unchecked 'Modify the Document', but after export this pdf is still editable.
What I have to do, to make it work ?
In Export to Pdf dialog -> Security -> I unchecked 'Modify the Document', but after export this pdf is still editable.
What I have to do, to make it work ?
This discussion has been closed.
Comments
Hello!
In the PDF export dialog, go to the Security tab and, in addition to unchecking the “Modify the Document” box, be sure to fill in the “Owner password” field (you can leave the “User password” field blank so that users can open the file without entering a password).
When exporting from C# code:
using FastReport; using FastReport.Export.Pdf; using var report = new Report(); report.Load(“report.frx”); report.Prepare(); using var pdfExport = new PDFExport { OwnerPassword = “StrongOwnerPassword”, // required to apply restrictions AllowModify = false, // prevent document modification AllowAnnotate = false, // prevent comments if necessary AllowPrint = true, AllowCopy = true }; report.Export(pdfExport, “readonly.pdf”);