Class PdfAllowedTagRelations

java.lang.Object
com.itextpdf.kernel.pdf.tagutils.PdfAllowedTagRelations

public class PdfAllowedTagRelations extends Object
This class defines the allowed parent-child relations for the PDF2.0 standard.
  • Field Details

  • Constructor Details

  • Method Details

    • isRelationAllowed

      public boolean isRelationAllowed (String parentRole, String childRole)
      Checks if the given parent-child relation is allowed.
      Parameters:
      parentRole - The parent role.
      childRole - The child role.
      Returns:
      true if the relation is allowed, false otherwise.
    • isContentAllowedInRole

      public boolean isContentAllowedInRole (String parentRole)
      Checks if the given parent role allows content.
      Parameters:
      parentRole - The parent role.
      Returns:
      true if the parent role allows content, false otherwise.
    • normalizeRole

      public String normalizeRole (String role)
      Normalizes the role.
      Parameters:
      role - The role to normalize.
      Returns:
      The normalized role.