Marian Aldenhövel wrote:
> I have uploaded a cleaned up sample PDF suitable for public distribution to:
> 
>    http://www.marian-aldenhoevel.de/tmp/SampleForm.pdf

I have just published a couple of examples with a dynamic XFA form.

> I can extract the XFA from that using:
> 
>    http://www.marian-aldenhoevel.de/tmp/DumpXFA.java
>    http://www.marian-aldenhoevel.de/tmp/dumpxfa.jar

There are two ways to extract the XFA:
- by brute force: http://1t3xt.be/?X000478
- the way you do it: http://1t3xt.be/?X00077e

> But I can't replace any modifications to the XFA (made externally 
> on-disk in this simple example) when using:
> 
>    http://www.marian-aldenhoevel.de/tmp/Seal.java
>    http://www.marian-aldenhoevel.de/tmp/seal.jar

I also have two examples showing how I fill out a dynamic XFA form.
(I don't think your example is dynamic XFA, but I used a dynamic
XFA form, because that's more appealing):

Again using brute force: http://1t3xt.be/?X000488
However: this isn't going to work for ALL dynamic XFA forms.

It's better to do it the way you do it. I have no idea where it goes 
wrong for you; I looked at your code, then I wrote an example from 
scratch: http://1t3xt.be/?X00077f

What happens in my code?
Well, I have an XML with data:
http://1t3xt.info/examples/resources/questions/forms/datasets.xml
Normally, you'd want to create this structure using code, creating 
nodes, importing them into the new document. I used an XML file for 
simplicity reasons: that way you can see what I'm adding to the XFA form.
In the "brute force" example, I just replace that single stream in the 
existing PDF. This isn't good design: you can't be sure if the datasets 
snippet is present in a separate stream.
In the second example, I use the XFA object to get the DOM Document, and 
I replace the "data" in the "datasets" node.

I'm not sure what you are trying to achieve in your example; I assume 
you're looking to fill out the form. In that case, you'll also have to 
replace the content that is in the "datasets" part of the XFA XML.

I hope this makes sense.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
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