Thomas Büngener schreef op 21/02/2014 13:26:
>
> Hello,
>
> I have checkboxes that have only one appearance state. I.e. AP->N not 
> being a dictionary but
>
> a stream containing only BBox. As I understand this construktion seems 
> Ok, as in PDF/A AP->N must not
>
> be a dictionary and the „Off“ state can be left away (this is because 
> PDF/A does not allow multiple appearance states).
>
> acroFields.getAppearanceStates returns an empty Array in this case.
>

This is normal for the reason you mention above: AP->N is not a dictionary.

> The AS (Appearance state) is „Off“ as long as the Chekbox is unticked.
>
> When I tick it in Acrobat and save the file, the AS is set to „Ja“.
>

Well, in my case it's "Yes".

> If i use AcroFileds.setField this does not work because the metod 
> isInAP which is used inside
>
> setField returns false.
>

Indeed. You are giving the exact reasn why it doesn't work.

> Now I tried to set the AS value directly to „Ja“ and this works!
>

Correct.

> The Value „Ja“ is show as „export value“ for this field in Acrobat Pro 
> and, as stated before,
>
> Acrobat writes „Ja“ to AS when I tick the box and save the file.
>
> Now my remaining problem ist he following:
>
> I have no idea where Acrobat takes this ticked-value („Ja“) from.
>

Convention.
As I already explained: in my case Acrobat puts "Yes" instead of "Ja".
If you change the language settings, you can get another result.

> I cannot find it anywhere inside the file, nor am I able to retrieve 
> it programatically.
>

That's because it's not in the file ;-)

> The value „Off“ seems to be fixed (according to Standards), but the 
> value „Ja“ is not.
>

The value "Off" is defined in ISO-32000-1; see section 12.7.4.2.3:
"The appearance for the off state is optional but, if present, shall be 
stored in the appearance dictionary under the name Off. Yes should be 
used as the name for the on state."

When you read "shall" in an ISO document, the text is normative: no 
other value is allowed or your document is invalid.
When you read "should" in an ISO document, the text is a rule, but if 
you don't follow the rule, your document isn't invalid.

> Does anybody know, how this „Ja“ value can be found inside the pdf?
>

No, you should assume it isn't "Ja", but "Yes".
If something else is used, it's a choice made by the software (in this 
case your German version of Acrobat).

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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

Reply via email to