public class PdfUAValidationContext extends Object
| Constructor and Description |
|---|
PdfUAValidationContext(PdfDocument pdfDocument)
Creates a new instance of
PdfUAValidationContext. |
| Modifier and Type | Method and Description |
|---|---|
PdfObjRef |
findObjRefByStructParentIndex(int i,
PdfDictionary pageDict)
Retrieves object reference instance by provided structure parent index.
|
PdfStructElem |
getElementIfRoleMatches(PdfName role,
IStructureNode structureNode)
Checks if a
IStructureNode resolved role's is equal to the provided role. |
PdfUAConformance |
getUAConformance()
Retrieves the PDF/UA conformance of the
PdfDocument. |
String |
resolveToStandardRole(IStructureNode node)
Resolves the node's role to a standard role.
|
String |
resolveToStandardRole(String role)
Resolves the role to a standard role.
|
String |
resolveToStandardRole(String role,
PdfNamespace namespace)
Resolves the role to a standard role.
|
public PdfUAValidationContext(PdfDocument pdfDocument)
PdfUAValidationContext.pdfDocument - the PdfDocument instance that is being validatedpublic String resolveToStandardRole(IStructureNode node)
node - The node you want to resolve the standard role for.public String resolveToStandardRole(String role)
role - the role you want to resolve the standard role forpublic String resolveToStandardRole(String role, PdfNamespace namespace)
role - the role you want to resolve the standard role fornamespace - namespace where role is definedpublic PdfStructElem getElementIfRoleMatches(PdfName role, IStructureNode structureNode)
IStructureNode resolved role's is equal to the provided role.
Note: This method will not check recursive mapping. So either the node's role is the provided role, or the standard role is the provided role. So we do not take into account the roles in between the mappings.
role - The role we want to check against.structureNode - The structure node we want to check.PdfStructElem if the role matches.public PdfObjRef findObjRefByStructParentIndex(int i, PdfDictionary pageDict)
i - index of the structure parentpageDict - PdfDictionary of the page that PdfObjRef belong toPdfObjRef instancepublic PdfUAConformance getUAConformance()
PdfDocument.PdfUAConformance valueCopyright © 1998–2025 Apryse Group NV. All rights reserved.