DynaPDF Manual - Page 583

Previous Page 582   Index   Next Page 584

Function Reference
Page 583 of 839
Note that several structure elements like btListElem or btTableHeader cannot be used stand alone.
That means the corresponding parent tag must be opened before such a tag can be used. For
example, the tag btListElem is only valid as child of a btList element and btListElemText is in turn
only valid when used as a child of a btListElem tag!
Example:
pdfOpenTag(PDF, btList, NULL, NULL, NULL);
// OK
pdfOpenTag(PDF, btListElem, NULL, NULL, NULL);
// OK
pdfOpenTag(PDF, btListElemText, NULL, NULL, NULL); // OK
pdfWriteText(PDF, 50.0, 50.0, "Some list text!");
pdfCloseTag(PDF);
pdfCloseTag(PDF);
pdfCloseTag(PDF);
pdfOpenTag(PDF, btList, NULL, NULL, NULL);
// OK
pdfOpenTag(PDF, btListElemText, NULL, NULL, NULL);
// Wrong
pdfOpenTag(PDF, btListElem, NULL, NULL, NULL);
// Wrong
pdfWriteText(PDF, 50.0, 50.0, " Some list text!");
pdfCloseTag(PDF);
pdfCloseTag(PDF);
pdfCloseTag(PDF);
pdfOpenTag(PDF, btListElem, NULL, NULL, NULL);
// Wrong
pdfWriteText(PDF, 50.0, 50.0, "List Element!");
pdfCloseTag(PDF);
The tags btAnnot, btForm, and btLink can be used to add annotations and form fields to the structure.
Note that the corresponding annotation or form field is required! When opening such a tag without
inserting the corresponding annotation or field before the tag is closed then the structure will be
damaged!
Remarks:
The maximum allowed nesting level of marked content operators is 64, including optional content
operators (Layers). At time of publication DynaPDF does not check whether tags are used in the
correct hierarchy.
However, when creating tagged PDF files you should always validate the tagging information with
the accessibility check of Adobe's Acrobat (Menu Advanced/Accessibility/Full Check...).
Tagged PDF files should be created in the logical reader.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is zero.
 

Previous topic: OpenTag

Next topic: OpenTagBBox, OpenTagEx