Question Locked

Prevent PDF from editing in pdf writer programmatically

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am creating PDFs using iTextSharp Library and I want to prevent pdf files from editing in pdf writer.

plz help

4 replies

by thumbsup2

Using the Adobe Accrobat program will allow you to save PDF documents with document rights which prevent editing and even password the file. Using anything else won't allow you to create the correct document permissions. It's a proprietary file type.

by smahmood_ali

Now I am able to apply restrictions on PDF programmatically using st.SetEncryption(false, null, null, PdfWriter.AllowPrinting | PdfWriter.AllowModifyContents | PdfWriter.AllowCopy)

but I have to allow only three following elements of PDF document
1) Printing
2) Content Copying for accessibility
3) Filling of form fields.

Above lines of code is also allowing "Content Copying" element.

This discussion is closed to new replies.