DynaPDF Manual - Page 569

Previous Page 568   Index   Next Page 570

Function Reference
Page 569 of 821
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, btField, 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!
However, the usage of these tags is normally not required because DynaPDF adds fields and
annotations automatically to the structure. When an annotation or form field is inserted within an
open tag then it will be added to this tag. If no open tag is present then it is added to the root of the
page's structure.
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: Optimize