Question on security
- From: "Mark Storer" <MStorer (at) cardiff.com>
- Date: Fri, 12 May 2006 11:25:05 -0700
I take it that you started with a "reader enabled" PDF?
--Mark Storer
Senior Software Engineer
Cardiff Software
#include <disclaimer>
typedef std::Disclaimer<Cardiff> DisCard;
> -----Original Message-----
> From: itext-questions-admin (at) lists.sourceforge.net
> [mailto:itext-questions-admin (at) lists.sourceforge.net]On Behalf Of Guy
> Careau
> Sent: Friday, May 12, 2006 11:08 AM
> To: itext-questions (at) lists.sourceforge.net
> Subject: [iText-questions] Question on security
>
>
> Hi there,
>
> I have a document pdf that have security options that allow
> the pdf to be
> modified and save on disk. After setting some field with
> itext, when i open
> the document with
> acrobat reader I have the message " This document contained
> certain rights
> to enable special features in Adobe Reader.
> The document has been changed since it was created and these
> rights are no
> longer valid. Please contact the author
> for the original version of this document", the document
> cannot be save on
> disk anymore.
>
> Here it the code i use.
>
> PdfReader reader = new PdfReader(docuemntInBytes[]Array);
> PdfStamper stamp = new PdfStamper(reader, out);
>
> AcroFields destForm = stamp.getAcroFields();
> PRAcroForm acroForm = reader.getAcroForm();
> if (acroForm != null)
> {
> ArrayList fields = acroForm.getFields();
> for (int idx = 0; idx < fields.size(); ++idx)
> {
> PRAcroForm.FieldInformation field =
> (PRAcroForm.FieldInformation)fields.get(idx);
> String fName = field.getName();
> destForm.setField(fName, "testSecurity");
> }
> }
>
> stamp.close();
> pdfBytes = out.toByteArray();
>
> Thanks.
>
> _________________________________________________________________
> Scan and help eliminate destructive viruses from your inbound
> and outbound
> e-mail and attachments.
> http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&
> DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
> Start enjoying all the benefits of MSN® Premium right now
> and get the
> first two months FREE*.
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web
> services, security?
> Get stuff done quickly with pre-integrated technology to make
> your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on
> Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&
dat=121642
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions