pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: PDFbox and tab index
Date Thu, 25 Oct 2012 08:43:13 GMT
OK - I created two forms one with and one wo tab index using Acrobat X.

If there is a Tab order manually defined there is a /Tabs entry with a /W name entry (which
I couldn't find in the ISO-32000 spec). In addition the order of the form fields in the /Fields
entry of the AcroForms  dictionary seems to determine the order in which they are to be filled.
The /Tabs entry doesn't seem to be mandatory. Manually changing the order of the /Fields entries
in the (decoded) PDF source of the form wo a predefined Tab order gives the same results as
setting the order from within Acrobat.

The specification also mentioned that the structure tree can determine the order of annotations
but this doesn't seem to be used for forms as there is no structure tree in the files written
by Acrobat X.

If my assessments are correct a potential method like getTabIndex(myField) simply needs to
look for where the field appears in the /Fields array.

btw. preview on Mac doesn't respect the tab order set by Acrobat.

Kind regards

Maruan Sahyoun

Am 25.10.2012 um 09:14 schrieb Duane Nickull <duane@technoracle-systems.com>:

> I haven't looked at Acroforms as they are COS based.  The answer will
> involve patience and practical experience with a hex editor.  I am not
> sure if anyone else has taken the time to crack this?
> 
> BTW - Ben Litchfield is noted as the author for most of the PDF BOx
> classes.  I have tried to reach out to him to respond on a couple of
> PDFBox issues but have never heard back.  Has anyone else on the list
> communicated with him?  I think that if he sees how many people are
> interested in advancing PDFBox we could all work together.
> 
> Just a thought.
> 
> Duane
> 
> ***********************************
> Technoracle Advanced Systems Inc.
> Consulting and Contracting; Proven Results!
> i.  Neo4J, PDF, Java, LiveCycle ES, Flex, AIR, CQ5 & Mobile
> b. http://technoracle.blogspot.com
> t.  @duanechaos
> "Don't fear the Graph!  Embrace Neo4J"
> 
> 
> 
> 
> 
> 
> On 2012-10-24 9:34 PM, "Maruan Sahyoun" <sahyoun@fileaffairs.de> wrote:
> 
>> OK - so now we know where it is in XFA - but what about a form wo XFA?
>> 
>> Maruan Sahyoun
>> 
>> Am 25.10.2012 um 01:38 schrieb Duane Nickull
>> <duane@technoracle-systems.com>:
>> 
>>> OK, I found it.  Tab order seems to be declared in XFA using the
>>> following
>>> syntax:
>>> 
>>> <traversal>
>>> <traverse ref="(SOME_OTHER_FIELD)[index] />
>>> </traversal>
>>> 
>>> Some other field (above) is the ID of the first field.  Outside of the
>>> fields element depth is a traversal start point, also referencing a
>>> single
>>> unique field in the PDF/XFA document.
>>> 
>>> After playing around with LiveCycle Designer a bit, it turns out that
>>> until you save the form that is open, the traversal info is not present
>>> and is only added if the default tab order is changed.
>>> 
>>> I double checked this with the reference to XFA and found this:
>>> 
>>> "Traversal order. An XFA template may be defined with a traversal order,
>>> which allows the user to tab
>>> from one field to the next."
>>> 
>>> The specification is here:
>>> http://partners.adobe.com/public/developer/en/xml/xfa_spec_2_4.pdf
>>> 
>>> To aster your other question Maruan, yes - there is a default tabbing
>>> order.  This is described in terms of left to right and flowing
>>> vertically.   THere is a complete description of the order described
>>> when
>>> multiple elements of the same sub-form contain children.
>>> 
>>> Duane Nickull
>>> 
>>> ***********************************
>>> Technoracle Advanced Systems Inc.
>>> Consulting and Contracting; Proven Results!
>>> i.  Neo4J, PDF, Java, LiveCycle ES, Flex, AIR, CQ5 & Mobile
>>> b. http://technoracle.blogspot.com
>>> t.  @duanechaos
>>> "Don't fear the Graph!  Embrace Neo4J"
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On 2012-10-24 2:18 PM, "Maruan Sahyoun" <sahyoun@fileaffairs.de> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> it's correct that there is currently not a method to retrieve the
>>>> infomation but in order to implement it we need to know where to look
>>>> for
>>>> the relevant parts. I can build a sample form so we can look if my
>>>> interpretation is correct.
>>>> 
>>>> As tabbing order is something which worked prior to PDF 1.5 maybe there
>>>> is some default e.g left to right, top to bottom
>>>> 
>>>> Maruan Sahyoun
>>>> 
>>>> Am 24.10.2012 um 22:14 schrieb Andreas Lehmkuehler <andreas@lehmi.de>:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> Am 24.10.2012 19:39, schrieb Duane Nickull:
>>>>>> Yes, that is the formal (normative PDF specification).  I used to
>>>>>> work
>>>>>> at
>>>>>> Adobe and was part of the team that helped move PDF from Adobe to
>>>>>> ISO.
>>>>>> That is different than PDFBox.  PDFBox is an implementation of
>>>>>> programmatic ways to manipulate PDF documents.   I have not seen
>>>>>> anything
>>>>>> that can interpret the tabbing order in the PDFBox library although
>>>>>> you
>>>>>> can grab the JavaScript so it might be possible.
>>>>>> 
>>>>>> The public API I would expect to see here would be something to the
>>>>>> effect
>>>>>> of having a "getTabIndex(PDField field):int" or similar.  I have
not
>>>>>> seen
>>>>>> that but someone please correct me if I am wrong.
>>>>> The question is, where can we find the information which is needed to
>>>>> implement such a method. Maruan already mentioned the "Tabs" value of
>>>>> a
>>>>> page. But that value seems to be related to annotations and not to
>>>>> forms. So any ideas where to look?
>>>>> 
>>>>>> Duane Nickull
>>>>>> ***********************************
>>>>>> Technoracle Advanced Systems Inc.
>>>>>> Consulting and Contracting; Proven Results!
>>>>>> i.  Neo4J, PDF, Java, LiveCycle ES, Flex, AIR, CQ5 & Mobile
>>>>>> b. http://technoracle.blogspot.com
>>>>>> t.  @duanechaos
>>>>>> "Don't fear the Graph!  Embrace Neo4J"
>>>>>> 
>>>>>> SNIP
>>>>> 
>>>>> BR
>>>>> Andreas Lehmkühler
>>> 
>>> 
> 
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message