1T3XT info wrote:
> 
> chris123321 wrote:
>> Ok, I attached a small eclipse project, without the itext 2.0.8 jar. The
>> resulting pdf resides in the bin folder.
> 
> Aha, before I could only guess; now your problem is crystal clear.
> 
> Have a look at your original PDF.
> It contains an XFA form with stuff like:
> 
> <field h="4.1204mm" name="mr" w="4.1204mm" y="0mm">
>    <ui>
>      <checkButton mark="cross" size="3.8806mm">
>        <border hand="right">
>          <fill>
>            <color value="255, 255, 255"/>
>          </fill>
>          <?templateDesigner StyleID apcb1?>
>        </border>
>      </checkButton>
>    </ui>
>    
>    <para vAlign="middle"/>
>    <items>
>      <integer>1</integer>
>    </items>
>    <assist>
>      <toolTip>Herr</toolTip>
>      <speak priority="toolTip"/>
>    </assist>
> </field>
> <field h="4.1204mm" name="mrs" w="4.1204mm" x="11.3922mm">
>    <ui>
>      <checkButton mark="cross" size="3.8806mm">
>        <border hand="right"><?templateDesigner StyleID apcb1?>
>          <fill>
>            <color value="255, 255, 255"/>
>          </fill>
>        </border>
>        <margin/>
>      </checkButton>
>    </ui>
>    
>    <para vAlign="middle"/>
>    <items>
>      <integer>2</integer>
>    </items>
>    <assist>
>      <toolTip>Frau</toolTip>
>      <speak priority="toolTip"/>
>    </assist>
> </field>
> 
> Do you see that these are two checkbuttons? Do you see the tooltips?
> OK, this is XFA, and as you (should) know, iText only has limited XFA
> support. As a matter of fact, I don't know of any other product other
> than Adobe products that offer XFA support. All other PDF products
> involving forms only support AcroForms.
> 
> Let me anticipate on your next question: "What are AcroForms?"
> Look further inside your original PDF.
> It also has the AcroForm version of the fields above:
> 
> 70 0 obj
> <</Rect[32.304 591.997 43.304 
> 602.997]/NM(topmostSubform[0].Page1[0].customer_salutation[0].mr[0])/Subtype/Widget/BS<</S/S/W
>  
> 1>>/Parent 15 0 R/F 4/P 45 0 R/Type/Annot/MK<</BG[1.0 1.0 
> 1.0]/CA(8)/BC[0.0 0.0 0.0]>>/AP<</D<</1 73 0 R/Off 74 0 R>>/N<</1 71 0 
> R/Off 72 0 R>>>>/AS/Off>>
> endobj
> 
> 65 0 obj
> <</Rect[67.849 591.997 78.849 
> 602.997]/NM(topmostSubform[0].Page1[0].customer_salutation[0].mrs[0])/Subtype/Widget/BS<</S/S/W
>  
> 1>>/Parent 15 0 R/F 4/P 45 0 R/Type/Annot/MK<</BG[1.0 1.0 
> 1.0]/CA(8)/BC[0.0 0.0 0.0]>>/AP<</D<</2 68 0 R/Off 69 0 R>>/N<</2 66 0 
> R/Off 67 0 R>>>>/AS/Off>>
> endobj
> 
> Do you see the resemblance ("mr" and "mrs") and the differences?
> The differences are easier to find ;-)
> 
> There's no such thing as a tooltip in this version of the fields.
> However: when we look at the Parent object, we see this:
> 
> 15 0 obj
> <</TU(Herr)/Parent 14 0 R/T(customer_salutation[0])/FT/Btn/Ff 
> 49152/Kids[60 0 R 65 0 R 70 0 R]>>
> endobj
> 
> The TU key in the parent of the checkboxes you refer to has the
> value Herr. What is TU? The PDF reference explains:
> 
> TU: An alternate field name to be used in place of the actual field name
> wherever the field must be identified in the user interface (such as in
> error or status messages referring to the field). This text is also
> useful when extracting the document’s contents in support of
> accessibility to users with disabilities or for other purposes (see
> Section 10.8.2, "Alternate Descriptions").
> 
> Now why am I explaining all this?
> 
> iText has limited XFA support in the sense that it can read/fill
> static XFA forms based on AcroForm technology. If you look at
> your resulting PDF, you'll see that the XFA stream has disappeared.
> The result is an AcroForm. You see 'Herr' as tooltip for all the
> checkboxes because 'Herr' is the value of the TU key in the parent
> of all those checkboxes.
> 
> How do you solve your problem?
> 
> Either you don't work with an XFA form as original template.
> Or you stick with Adobe products that have full XFA support.
> Or you write XFA support for iText.
> 
> This is probably not the answer you hoped for. That's also why
> I'm using hands and feet to explain what causes your problem.
> I hope the level of detail in this answer convinces you that
> this is not an iText problem. It's not a bug; it's an issue
> that is inherent to the choice you have made when you opted
> to work with XFA (deliberately or not).
> -- 
> This answer is provided by 1T3XT BVBA
> 
> -------------------------------------------------------------------------
> 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/
> 
> 

First thanx alot for you effort.

I never heard of XFA or AcroForms before, i am just a dumb xml-hating java
user who is lucky smth like itext exists. But you made it perfectly clear
what my problem here is.

I'll ask our "pdf-producer" if he can somehow choose not to use XFA but
AcroForms when generating the template; I heard we paid some money to get
this super duper acrobat tool.

Thanks again,
Chris


-- 
View this message in context: 
http://www.nabble.com/Tool-Tips-before-and-after-resultWriter.addPage%28page%29-tp15351611p15502124.html
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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