Generated by
JDiff

com.itextpdf.kernel.pdf.tagutils Documentation Differences

This file contains all the changes in documentation in the package com.itextpdf.kernel.pdf.tagutils as colored differences. Deletions are shown like this , and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a tag will cause all subsequent paragraphs to be displayed differently.

Class TagStructureContext, constructor TagStructureContext(PdfDocument)

Do not use this constructor, instead use PdfDocument.getTagStructureContext() method.
Creates {@code TagStructureContext} for document. There shall be only one instance of this class per {@code PdfDocument}. @param document the document which tag structure will be manipulated with this class.
Class TagStructureContext, constructor TagStructureContext(PdfDocument, PdfVersion)

Do not use this constructor, instead use PdfDocument.getTagStructureContext() method.

Creates {@code TagStructureContext} for document. There shall be only one instance of this class per {@code PdfDocument}. @param document the document which tag structure will be manipulated with this class. @param tagStructureTargetVersion the version of the pdf standard to which the tag structure shall adhere.

Class TagStructureContext, boolean checkIfRoleShallBeMappedToStandardRole(String, PdfNamespace)

Checks if the given role and namespace are specified to be obligatory mapped to the standard structure namespace in order to be a valid role in the Tagged PDF. @param role a role in the given namespace which mapping necessity is to be checked. @param namespace a PdfNamespace which this role belongs to, null value refers to the default standard structure namespace. @return true, if the given role in the given namespace is either mapped to the standard structure role or doesn't have to; otherwise false.
Class TagStructureContext, TagTreePointer createPointerForStructElem(PdfStructElem)

Creates a new TagTreePointer which points at given PdfStructElem. @param structElem a PdfStructElem for which TagTreePointer will be created. @return a new TagTreePointer.
Class TagStructureContext, PdfNamespace fetchNamespace(String)

This method defines a recommended way to obtain PdfNamespace class instances.

Returns either a wrapper over an already existing namespace dictionary in the document or over a new one if such namespace wasn't encountered before. Calling this method is considered as encountering a namespace, i.e. two sequential calls on this method will return the same namespace instance (which is not true in general case of two method calls, for instance if several namespace instances with the same name are created via PdfNamespace constructors and set to the elements of the tag structure, then the last encountered one will be returned by this method). However encountered namespaces will not be added to the document's structure tree root /Namespaces array unless they were set to the certain element of the tag structure. @param namespaceName a String defining the namespace name (conventionally a uniform resource identifier, or URI). @return PdfNamespace wrapper over either already existing namespace object or over the new one.

Class TagStructureContext, TagStructureContext flushPageTags(PdfPage)

Flushes the tags which are considered to belong to the given page. The logic that defines if the given tag (structure element) belongs to the page is the following: if all the marked content references (dictionary or number references), that are the descendants of the given structure element, belong to the current page - the tag is considered to belong to the page. If tag has descendants from several pages - it is flushed, if all other pages except the current one are flushed.

If some of the page's tags have waiting state (see WaitingTagsManager these tags are considered as not yet finished ones, and they and their children won't be flushed. @param page a page which tags will be flushed flushed @return current TagStructureContext instance
Class TagStructureContext, TagTreePointer getAutoTaggingPointer()

All tagging logic performed by iText automatically (along with addition of content, annotations etc) uses TagTreePointer returned by this method to manipulate the tag structure. Typically it points at the root tag. This pointer also could be used to tweak auto tagging process (e.g. move this pointer to the Section tag, which would result in placing all automatically tagged content under Section tag). @return the {@code TagTreePointer} which is used for all automatic tagging of the document.
Class TagStructureContext, PdfNamespace getDocumentDefaultNamespace()

A namespace that is used as a default value for the tagging for any new TagTreePointer created (including the pointer returned by .getAutoTaggingPointer(), which implies that automatically created tag structure will be in this namespace by default).

By default, this value is defined based on the PDF document version and the existing tag structure inside a document. For the new empty PDF 2.0 documents this namespace is set to StandardNamespaces.PDF_2_0.

This value has meaning only for the PDF documents of version 2.0 and higher. @return a PdfNamespace which is used as a default value for the document tagging.

Class TagStructureContext, PdfStructElem getPointerStructElem(TagTreePointer)

Gets PdfStructElem at which TagTreePointer points.

NOTE: Be aware that PdfStructElem is a low level class, use it carefully, especially in conjunction with high level TagTreePointer and TagStructureContext classes. @param pointer a TagTreePointer which points at desired PdfStructElem. @return a PdfStructElem at which given TagTreePointer points.

Class TagStructureContext, IRoleMappingResolver getRoleMappingResolver(String)

Gets an instance of the IRoleMappingResolver corresponding to the current tag structure target version. This method implies that role is in the default standard structure namespace. @param role a role in the default standard structure namespace which mapping is to be resolved. @return a IRoleMappingResolver instance, with the giving role as current.
Class TagStructureContext, IRoleMappingResolver getRoleMappingResolver(String, PdfNamespace)

Gets an instance of the IRoleMappingResolver corresponding to the current tag structure target version. @param role a role in the given namespace which mapping is to be resolved. @param namespace a PdfNamespace which this role belongs to. @return a IRoleMappingResolver instance, with the giving role in the given PdfNamespace as current.
Class TagStructureContext, WaitingTagsManager getWaitingTagsManager()

Gets WaitingTagsManager for the current document. It allows to mark tags as waiting, which would indicate that they are incomplete and are not ready to be flushed. @return document's WaitingTagsManager class instance.
Class TagStructureContext, TagTreePointer removeAnnotationTag(PdfAnnotation)

Removes annotation content item from the tag structure. If annotation is not added to the document or is not tagged, nothing will happen. @param annotation the PdfAnnotation that will be removed from the tag structure structure @return TagTreePointer instance which points at annotation tag parent if annotation was removed, otherwise returns null
Class TagStructureContext, TagTreePointer removeContentItem(PdfPage, int)

Removes content item from the tag structure.
Nothing happens if there is no such mcid on given page. @param page page, which contains this content item @param mcid marked content id of this content item item @return {@code TagTreePointer} which points at the parent of the removed content item, or null if there is no such mcid on given page.
Class TagStructureContext, TagStructureContext removePageTags(PdfPage)

Removes all tags that belong only to this page. The logic which defines if tag belongs to the page is described at .flushPageTags(PdfPage). @param page page that defines which tags are to be removed removed @return current TagStructureContext instance
Class TagStructureContext, IRoleMappingResolver resolveMappingToStandardOrDomainSpecificRole(String, PdfNamespace)

Gets an instance of the IRoleMappingResolver which is already in the "resolved" state: it returns role in the standard or domain-specific namespace for the IRoleMappingResolver.getRole() and and IRoleMappingResolver.getNamespace() methods calls which correspond to the mapping of the given role; or null if the given role is not mapped to the standard or domain-specific one. @param role a role in the given namespace which mapping is to be resolved. @param namespace a PdfNamespace which this role belongs to. @return an instance of the IRoleMappingResolver which returns false for the IRoleMappingResolver.currentRoleShallBeMappedToStandard() method call; if mapping cannot be resolved to this state, this method returns null, which means that the given role in the specified namespace is not mapped to the standard role in the standard namespace.
Class TagStructureContext, TagStructureContext setDocumentDefaultNamespace(PdfNamespace)

Sets a namespace that will be used as a default value for the tagging for any new TagTreePointer created. See .getDocumentDefaultNamespace() for more info.

Be careful when changing this property value. It is most recommended to do it right after the PdfDocument was created, before any content was added. Changing this value after any content was added might result in the mingled tag structure from the namespaces point of view. So in order to maintain the document consistent but in the namespace different from default, set this value before any modifications to the document were made and before .getAutoTaggingPointer() method was called for the first time.

This value has meaning only for the PDF documents of version 2.0 and higher. @param namespace a PdfNamespace which is to be used as a default value for the document tagging. @return current TagStructureContext instance.

Class TagStructureContext, TagStructureContext setForbidUnknownRoles(boolean)

If forbidUnknownRoles is set to true, then if you would try to add new tag which has not a standard role and it's role is not mapped through RoleMap, an exception will be raised. Default value - true. @param forbidUnknownRoles new value of the flag flag @return current TagStructureContext instance.