I'm in doubt if my mail reached the mailing list, if this is a double post,
my apologies...

Does anyone have an idea what is wrong with the below code excerpt?

Tia,

Klaus

-----Oorspronkelijk bericht-----
Van: Klaus Vancamelbeke [mailto:[email protected]] 
Verzonden: woensdag 13 januari 2010 2:23
Aan: '[email protected]'
Onderwerp: RE: [iText-questions] XFA manipulation renders pdf unreadable by
LiveCycle

Hi,

Thanks for the answers so far.

I've upgraded to iText# 5 in the meanwhile and am trying to generate a pdf
based on fillXfaForm. I'm stumbling on a problem where the xfaForm does
populate the xml data fed to the fillXfaForm method (determined at runtime
in debug) but the saved pdf does not contain or show the data. I've included
the lines of code used below and am hoping someone can point out a flaw...

            PdfReader pdfReader = new PdfReader(templatePath);
            FileStream pdfStream = new FileStream(pdfPath, FileMode.Create);
            PdfStamper pdfStamper = new PdfStamper(pdfReader, pdfStream);
            XfaForm xfaForm = new XfaForm(pdfReader);
            xfaForm.FillXfaForm(content.SelectSingleNode("IKG"));
//verified: content is inserted in the xfa:data section in memory here
            pdfStamper.Close();

Tia,

Klaus

-----Oorspronkelijk bericht-----
Van: 1T3XT info [mailto:[email protected]] 
Verzonden: dinsdag 12 januari 2010 17:58
Aan: Post all your questions about iText here
Onderwerp: Re: [iText-questions] XFA manipulation renders pdf unreadable by
LiveCycle

Leonard Rosenthol wrote:
[1]
> The iText# version uses the old, single stream representation of the XFA
key.
> The Acrobat Pro version uses the new array-of-streams representation for
the XFA key. 
> As recommended by ISO 32000-1, you should be using the array version for
best compatibility.

So does the iText 5 method fillXfaForm();
See http://itextpdf.com/examples/index.php?page=example&id=165
The OP uses an old technique.

[2]
> The <form> DOMs are also different: the Acrobat Pro version is the result
of a merge with data
> while the iText# version appears to be an empty merge (although it also
has more fields in it).

Is that necessary?
I thought the idea was to separate the data from the presentation...

If the problem is caused by [1], the solution would be to upgrade to 
iText 5 (note that the license has changed to AGPL).
If the problem is caused by [2], then we'll need to add functionality to 
iText so that the <form> reflects the data.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.725 / Virus Database: 270.14.134/2613 - Release Date: 01/12/10
08:35:00


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to