Re: [iText-questions] Handling PDF/A Checkboxes with a single appearance

2014-02-24 Thread iText Info
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=126839071iu=/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


Re: [iText-questions] Handling PDF/A Checkboxes with a single appearance

2014-02-24 Thread Leonard Rosenthol
Correct.

And since your PDF doesn't have a pre-defined alternative for Off (which
is the current value specified), Acrobat (or iText or any other client) is
free to pick whatever On value it wants (as noted by Bruno below).

If you want a specific one, put it in the PDF when you create it.

Leonard

On 2/24/14 11:13 AM, iText Info i...@1t3xt.info wrote:

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=126839071iu=/4140/ostg.clkt
rk
___
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

--
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=126839071iu=/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

Re: [iText-questions] Handling PDF/A Checkboxes with a single appearance

2014-02-21 Thread Leonard Rosenthol
What version of PDF/A are you referring to since the rules for annotation 
appearances changed between PDF/A-1 and PDF/A-2 (and –3)?

I would assume that Ja in the export values.

Leonard

From: Thomas Büngener thomas.buenge...@is2.demailto:thomas.buenge...@is2.de
Reply-To: Post here 
itext-questions@lists.sourceforge.netmailto:itext-questions@lists.sourceforge.net
Date: Friday, February 21, 2014 7:26 AM
To: Post here 
itext-questions@lists.sourceforge.netmailto:itext-questions@lists.sourceforge.net
Subject: [iText-questions] Handling PDF/A Checkboxes with a single appearance

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

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

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

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.
I cannot find it anywhere inside the file, nor am I able to retrieve it 
programatically.
The value „Off“ seems to be fixed (according to Standards), but the value „Ja“ 
is not.

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

I‘m using iText 2.1.7 right now, but I also tried using latest v5 to solve the 
problem.
I am not the producer oft he PDF so i cannot modify it in any way and the PDF/A 
conformance
must be retained. So I cannot change the appearance(s) oft he checkbox.

I can provide a reduced version of the problematic file (35kb) if that might be 
helpful.

sincerly
Thomas

--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/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

Re: [iText-questions] Handling PDF/A Checkboxes with a single appearance

2014-02-21 Thread iText Info
Thomas Büngener schreef op 21/02/2014 13:26:
 I can provide a reduced version of the problematic file (35kb) if that 
 might be helpful.

Yes, that would help, otherwise we're working in the void.
Looking at the PDF using iText RUPS can help us analyze the problem.

--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/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