Package com.pd4ml.pdf.merge.internal
Class PdfConformance
- java.lang.Object
-
- com.pd4ml.pdf.merge.internal.PdfConformance
-
public final class PdfConformance extends java.lang.ObjectDetects a source document's own self-declared PDF/A or PDF/UA conformance (thepdfaid/pdfuaididentification schema in its XMP/Metadata, ISO 19005 / ISO 14289), and builds the equivalent XMP for a merged output whose sources all agree.This is a propagation of what the sources already claim about themselves, not an independent re-validation of the merged result --
com.pd4ml.pdf.mergehas no general PDF/A/PDF/UA validator built in. A source's claim is trusted at face value; the merge logic's own job is simply to not silently drop or contradict it when every source agrees.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPdfConformance.LevelOne conformance identification:partis always present;conformance/revisionmay benull(PDF/UA has neither).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]buildXmpPacket(PdfConformance.Level pdfA, PdfConformance.Level pdfUa, java.lang.String title)Builds a fresh, minimal XMP packet declaring the given conformance level(s) (either may benullto omit that schema) and, if given, adc:title, following the exactpdfaid/pdfuaidschemacom.pd4ml.pdf.builderitself emits elsewhere in this project.static PdfConformance.LeveldetectPdfA(COSDocument document)The document's own declared PDF/A identification, ornullif it doesn't declare one (or none is parseable).static PdfConformance.LeveldetectPdfUa(COSDocument document)The document's own declared PDF/UA identification, ornullif it doesn't declare one (or none is parseable).static java.lang.StringdetectTitle(COSDocument document)The document's owndc:title(Dublin Core, from its XMP/Metadata), falling back to the plain/Infodictionary's/Titlewhen the XMP doesn't carry one (or there's no XMP at all) -- ornullif neither does.
-
-
-
Method Detail
-
detectPdfA
public static PdfConformance.Level detectPdfA(COSDocument document)
The document's own declared PDF/A identification, ornullif it doesn't declare one (or none is parseable).
-
detectPdfUa
public static PdfConformance.Level detectPdfUa(COSDocument document)
The document's own declared PDF/UA identification, ornullif it doesn't declare one (or none is parseable).
-
detectTitle
public static java.lang.String detectTitle(COSDocument document)
The document's owndc:title(Dublin Core, from its XMP/Metadata), falling back to the plain/Infodictionary's/Titlewhen the XMP doesn't carry one (or there's no XMP at all) -- ornullif neither does. PDF/UA (ISO 14289-1 §7.1) requires a document's own XMP to declare a title whenever it declares PDF/UA conformance at all; a synthesized/merged document's XMP has neither unless something upstream is consulted for it.
-
buildXmpPacket
public static byte[] buildXmpPacket(PdfConformance.Level pdfA, PdfConformance.Level pdfUa, java.lang.String title)
Builds a fresh, minimal XMP packet declaring the given conformance level(s) (either may benullto omit that schema) and, if given, adc:title, following the exactpdfaid/pdfuaidschemacom.pd4ml.pdf.builderitself emits elsewhere in this project.
-
-