It can't.

If you make ANY changes to the PDF you will break the rights. It's specifically designed this way to detect tampering.

The only choice you have, if you wish to distribute a file with Reader Enablement is to purchase Adobe LiveCycle ES and have it process your document AFTER you do whatever dynamic functionality you wish.

Leonard


On Feb 5, 2008, at 6:20 AM, Samuel B. Quiring wrote:

I don't get it. How should this code be rewritten so that the resulting PDF still has the rights? Do you know for a fact that it can be done?

-Sam

From: [EMAIL PROTECTED] [mailto:itext- [EMAIL PROTECTED] On Behalf Of Leonard Rosenthol
Sent: Tuesday, February 05, 2008 6:09 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] How to change a PDF but preserve the rights

You rewrote the PDF - therefore you changed it.

Leonard

On Feb 4, 2008, at 10:32 PM, Samuel B. Quiring wrote:

Leonard,
Are you sure? I have tried a few variations and I have not been able to get anything to work. I now have a simple identity() routine that changes nothing. The incoming PDF has rights that lets Reader save filled-in data. The resulting PDF has the rights removed. As far as I can tell, I changed nothing. What did I do wrong? Here is the code:
public static void identity()
{
PdfReader reader = new PdfReader("C:/tmp/niceForm.pdf");
reader.setAppendable(true);
XfaForm xfaForm = new XfaForm(reader);
FileOutputStream pdfOutput = new FileOutputStream("C:/tmp/ newFormOut.pdf");
PdfStamper stamper = new PdfStamper(reader, pdfOutput);

xfaForm.setXfa(stamper.getWriter());
stamper.close();
pdfOutput.close();
reader.close();
}
-Sam

----- Original Message -----
From: Leonard Rosenthol
To: Post all your questions about iText here
Sent: Monday, December 03, 2007 4:20 AM
Subject: Re: [iText-questions] How to change a PDF but preserve the rights

It _IS_ possible to fill in a PDF that has been "Reader Enabled" w/ o violating the rights - but it MUST be done in a very specific fashion using "append mode" on the source PDF AND only modifying a limited number of objects in the PDF.

So yes, if you are going to create a whole new PDF - you'll break the "Reader Enabling". If you're careful about what you do, and how you do it, you CAN accomplish your goal.

Leonard


On Dec 3, 2007, at 2:05 AM, Samuel B. Quiring wrote:

I have a PDF containing an XFA form; isXfaPresent() == true. The PDF was authored so that it can be opened in Adobe Reader, fields in the form can be filled, and the form can be saved by Reader to the file system. Using iText I have read in the PDF, obtained the XfaForm, changed values in the XML Document, and written a new PDF to the file system. The PDF I write out contains the values I put into the XML, but the rights to save the PDF from Reader have been lost. Is this expected? Other features of the original PDF are also lost in the newly-written PDF. I wrote the changed PDF to a new file. If this is the reason the save rights were lost, is there a way I can modify the existing PDF in place so that the rights to save the file from Adobe Reader are maintained?
-Sam
-------------------------------------------------------------------- ----- SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/ 8857-50307-18918-4_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/



--------------------------------------------------------------------- ---- SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4


_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/
--------------------------------------------------------------------- ----
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

---------------------------------------------------------------------- ---
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to