This content has been marked as final. Show 5 replies
No idea what your code applies to, it doesn't seem to be Create PDF
Online. But I am guessing these are setting PDF permission bits. The
save icon is always available, and nothing to do with PDF permissions.
It is strange, though not unprecendented, to have a legal requirement
that is impossible...
I have pasted my code below
We are creating a new pdf and applying permissions for that....
I searched for more than two hours and couldn't find a way to disable save icon in the API we use
com.lowagie.text.pdf.PdfWriter; [you can paste this in google which will explain this API]
I thought this as a constraint with this API, hence searching for other API's which has this feature...in most of the forums I saw implementing this as not possible....hence thought of checking in Adobe forum where people might suggest some other API...Please let me know whether this feature [if it is really a programmable feature] is available in API's you have used...Thanks Aandi Inston!
byte documentBytes = document.getContentBytes(); //which will get the content of a pdf
File newFile = File.createTempFile("tempPdfFile", ".tmp");
FileOutputStream fos = new FileOutputStream(newFile);
reader = new PdfReader(documentBytes);
int permissions = ~(PdfWriter.AllowPrinting | PdfWriter.AllowCopy | PdfWriter.AllowModifyAnnotations | PdfWriter.AllowFillIn | PdfWriter.AllowAssembly | PdfWriter.AllowModifyContents | PdfWriter.AllowScreenReaders);
>I have pasted my code below
Looks like you are using iText. This is the forum for Adobe's Create
PDF Online service.
>...in most of the forums I saw implementing this as not possible....
This is not possible at a PDF level. Because it is not possible, there
is no API to do it, anywhere.
If you want to double check the situation at least try a technical
forum. Try the Acrobat SDK forum, but don't try posting lines of code
belonging to a different non-Adobe product, it won't help you to get
Thanks Aandi Inston...I will post in Adobe SDK forum!