As noted, you will need Adobe LiveCycle ES (specifically Reader Extensions 
server and possibly Security Server) in order to achieve your goal.

Leonard

-----Original Message-----
From: sl2000 [mailto:sl2...@gmail.com] 
Sent: Monday, January 31, 2011 7:24 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Editable, Save-able, Encrypted PDFs - Possible?


Hi

I'm at the 'researching technologies' stage so I've not yet bought the book.

And I've not worked much with PDFs before so please excuse any dodgy
terminology I use.

I have a requirement to produce editable, save-able, encrypted PDFs from our
software.

Workflow would be...

1) System produces PDF by combining template with specific form data (eg
Name & Address).

2) PDF is encrypted with specific user's passphrase

3) System emails PDF to user

4) User fills in PDF using Acrobat Reader and saves.

5) User emails back saved PDF to System

6) System decrypts PDF and reads form fields filled in by user.

Is it possible to do this using iText?

I've stumbled across iText and it looks it should be possible, but I've had
a quick test with iTextSharp 5.0.5 using a pdf created in Acrobat[1] and
can't get the encryption bit working.  It seems that the PDF needs 'Usage
Rights' (which I assume only Adobe products can set) if it is to be
save-able in Reader; I can create the PdfStamper in 'Append' mode to
preserve these; but I cannot encrypt append-mode documents, so...

            PdfReader reader = new PdfReader(src);
            PdfStamper stamper = new PdfStamper(reader, new FileStream(dest,
FileMode.Create), '\0', false);
            stamper.SetEncryption(true, "s", "u",
                PdfWriter.ALLOW_FILL_IN |
                PdfWriter.ALLOW_PRINTING |
                PdfWriter.ALLOW_COPY |
                PdfWriter.ALLOW_MODIFY_CONTENTS |
                PdfWriter.ALLOW_MODIFY_ANNOTATIONS
               );
            stamper.Close();

...fails with an iTextSharp.text.DocumentException "Append mode does not
support changing the encryption status.".  If I set append-mode false I can
encrypt the PDF but Acrobat Reader reports a "The document has been changed
since it was created and these rights are no longer valid..." error and
disables saving the form.

We currently produce read-only PDFs using FOP on an xsl-fo file created by
our system, so we would be happy if the PDF document was originated in
iTextSharp (or FOP!) rather than Acrobat.  

I've also looked at the example Chap13_form (downloaded with the source from
sourceforge) and while this produces a PDF with editable fields it isn't
save-able.

Is this something I am going to be able to do with iText or do I need to use
a different technology (I'm guessing livecycle)?

Many thanks in advance
Simon Lewington

[1]: In fact I used an example from an earlier thread:
<http://itext-general.2136553.n4.nabble.com/iText-IKVM-C-stream-to-browser-issues-td2167197.html>
<http://itext-general.2136553.n4.nabble.com/file/n2334791/Form1B.PDF>

-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Editable-Save-able-Encrypted-PDFs-Possible-tp3248937p3248937.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to