Package com.itextpdf.kernel.pdf
Class PdfConformance
java.lang.Object
com.itextpdf.kernel.pdf.PdfConformance
The class represents possible PDF document conformance.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final PdfConformance
static final PdfConformance
static final PdfConformance
static final PdfConformance
static final PdfConformance
static final PdfConformance
static final PdfConformance
static final PdfConformance
static final PdfConformance
static final String
static final PdfConformance
static final PdfConformance
static final PdfConformance
static final PdfConformance
-
Constructor Summary
ConstructorDescriptionCreates a newPdfConformance
instance without PDF/A or PDF/UA conformance.PdfConformance
(PdfAConformance aConformance) Creates a newPdfConformance
instance based on only PDF/A conformance.PdfConformance
(PdfAConformance aConformance, PdfUAConformance uaConformance) Creates a newPdfConformance
instance based on PDF/A and PDF/UA conformance.PdfConformance
(PdfUAConformance uaConformance) Creates a newPdfConformance
instance based on only PDF/UA conformance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets thePdfAConformance
instance if specified.static PdfAConformance
getAConformance
(String part, String level) Gets an instance ofPdfAConformance
based on passed part and level.static PdfConformance
getConformance
(XMPMeta meta) GetsPdfConformance
instance fromXMPMeta
.Gets thePdfUAConformance
instance if specified.int
hashCode()
boolean
isPdfA()
Checks if any PDF/A conformance is specified.boolean
Checks if any PDF/A or PDF/UA conformance is specified.boolean
isPdfUA()
Checks if any PDF/UA conformance is specified.static void
setConformanceToXmp
(XMPMeta xmpMeta, PdfConformance conformance) Sets required fields into XMP metadata according to passed PDF conformance.
-
Field Details
-
PDF_A_4_REVISION
- See Also:
-
PDF_A_1A
-
PDF_A_1B
-
PDF_A_2A
-
PDF_A_2B
-
PDF_A_2U
-
PDF_A_3A
-
PDF_A_3B
-
PDF_A_3U
-
PDF_A_4
-
PDF_A_4E
-
PDF_A_4F
-
PDF_UA_1
-
PDF_NONE_CONFORMANCE
-
-
Constructor Details
-
PdfConformance
Creates a newPdfConformance
instance based on PDF/A and PDF/UA conformance.- Parameters:
-
aConformance
- the PDF/A conformance -
uaConformance
- the PDF/UA conformance
-
PdfConformance
Creates a newPdfConformance
instance based on only PDF/A conformance.- Parameters:
-
aConformance
- the PDF/A conformance
-
PdfConformance
Creates a newPdfConformance
instance based on only PDF/UA conformance.- Parameters:
-
uaConformance
- the PDF/UA conformance
-
PdfConformance
public PdfConformance()Creates a newPdfConformance
instance without PDF/A or PDF/UA conformance.
-
-
Method Details
-
isPdfA
public boolean isPdfA()Checks if any PDF/A conformance is specified.- Returns:
-
true
if PDF/A conformance is specified, otherwisefalse
-
isPdfUA
public boolean isPdfUA()Checks if any PDF/UA conformance is specified.- Returns:
-
true
if PDF/UA conformance is specified, otherwisefalse
-
isPdfAOrUa
public boolean isPdfAOrUa()Checks if any PDF/A or PDF/UA conformance is specified.- Returns:
-
true
if PDF/A or PDF/UA conformance is specified, otherwisefalse
-
getAConformance
Gets thePdfAConformance
instance if specified.- Returns:
-
the specified
PdfAConformance
instance ornull
.
-
getUAConformance
Gets thePdfUAConformance
instance if specified.- Returns:
-
the specified
PdfUAConformance
instance ornull
.
-
equals
-
hashCode
public int hashCode() -
getConformance
GetsPdfConformance
instance fromXMPMeta
.- Parameters:
-
meta
- the meta data to parse - Returns:
-
the
PdfConformance
instance
-
setConformanceToXmp
public static void setConformanceToXmp(XMPMeta xmpMeta, PdfConformance conformance) throws XMPException Sets required fields into XMP metadata according to passed PDF conformance.- Parameters:
-
xmpMeta
- the xmp metadata to which required PDF conformance fields will be set -
conformance
- the PDF conformance according to which XMP will be updated - Throws:
-
XMPException
- if the file is not well-formed XML or if the parsing fails
-
getAConformance
Gets an instance ofPdfAConformance
based on passed part and level.- Parameters:
-
part
- the part of PDF/A conformance -
level
- the level of PDF/A conformance - Returns:
-
the
PdfAConformance
instance ornull
if there is no PDF/A conformance for passed parameters
-