Static XFA is really a MIX of PDF page content with XFA/XML forms data bindings.
As such, any visual change (such as the border color) MUST be done using
standard PDF page content operations and NOT simply XML modifications.
Leonard
From: Narasayya Donepudi
<[email protected]<mailto:[email protected]>>
Reply-To: Post here
<[email protected]<mailto:[email protected]>>
Date: Sat, 1 Oct 2011 05:47:14 -0700
To: Post here
<[email protected]<mailto:[email protected]>>
Subject: [iText-questions] XFA form manipulation issue
Hi,
This question is about the xml extraction and reinsertion in XFA forms.
We are trying to use iText to extract the form xml out of an XFA pdf, modify it
using xml tools and reinsert the modified xml into the form.
We have done such things earlier like programmatically changing the text box
names and did them successfully.
The specific modification that we got stuck - is in adding a border color to a
text box.
Our base line form is a static XFA form that is created by importing an
existing PDF (to preserve the existing artwork, background etc.) and then
adding a text box in it. The text box does not have any border.
Now using this base line we go ahead and try to add a border color to this text
box using 2 approaches.
1) Using LiveCycle : A border color is added and that border is visible in the
resulting pdf file.
2) Using iText to extract the form xml, the use xml tools to manipulate the
form xml and reinsert the form xml back. A border is added using XML but it is
not visible. XML changes are exactly the same as in the LiveCycle.
The form xml in both cases appear to be same as far the border and other
properties are concerned.
Then we took this iText modified pdf (that one that was not showing the
border), opened it in LiveCycle and simply saved it again - and now
surprisingly the borders are visible..
I am attaching the
1. Base line : PDF and Form XML (BaseLine)
2. Border added in LiveCycle : PDF and Form XML (LC_Border)
3. Border added programatically using iText and xml tools : PDF and XML
(iText_Border)
4. iText modified file opened and saved in LiveCycle : PDF and XML
(iText_Border_opened_and_saved_in_LC)
I know that iText's role is limited to extracting and reinserting the xml of
the form. But suspect something odd may be occurring.
Please let me know what might be going wrong.
Regards,
Narasayya
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
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