Q: How do I obtain Form Field Tab Order in PDF?
Specifically, how do I obtain Form Field tab order for PDFs set to
Structured (custom) order, for version of Acrobat greater than 6.0?
PDF Reference refers to 'Entries in the structure tree root',
accessing 'StructTreeRoot' and the
'K' elements of the tree? Are there built-in methods of the PdfTron
PdfNet library that will provide tab order for the Form Fields? If
not, do you have any handy tree-traversal methods you can provide for
A: To obtain the tab order from the page use:
String t = "R";
Obj tabs = page.GetySDFObj().FindObj("Tabs");
if (tabs != null) t = tabs.GetName();
t is either R (row order), C (column order), or S (structure order) .
If t is "S" (structure order) you can use the same approach outlined
in LogicalStructure sample project (http://www.pdftron.com/pdfnet/
In particular, you will be looking for structure elements of type
"Annot", "Link", or "Form". These element explicitly specify the
association between a marked-content sequence and a corresponding
annotation. This is described in section 188.8.131.52.2 'Sequencing of
Annotations' in ISO PDF Reference.
Using CosEdit (http://www.pdftron.com/pdfcosedit) should be helpful to
understand the structure of PDF documents with this types of tab