From: Simon Steiner Date: Tue, 11 Aug 2015 14:43:08 +0000 (+0000) Subject: FOP-2509: Add support for PDF/A-3 X-Git-Tag: fop-2_1~41 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3b36d2319cf02aa9e480114dbc539dd7fc576278;p=xmlgraphics-fop.git FOP-2509: Add support for PDF/A-3 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1695313 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/xmlgraphics-commons-svn-trunk.jar b/lib/xmlgraphics-commons-svn-trunk.jar index 551295eb2..82ca2a684 100644 Binary files a/lib/xmlgraphics-commons-svn-trunk.jar and b/lib/xmlgraphics-commons-svn-trunk.jar differ diff --git a/src/java/org/apache/fop/pdf/PDFAMode.java b/src/java/org/apache/fop/pdf/PDFAMode.java index ab0acd35f..507b392ed 100644 --- a/src/java/org/apache/fop/pdf/PDFAMode.java +++ b/src/java/org/apache/fop/pdf/PDFAMode.java @@ -33,7 +33,11 @@ public enum PDFAMode { /** PDF/A-2b enabled. */ PDFA_2B(2, 'B'), /** PDF/A-2u enabled. */ - PDFA_2U(2, 'U'); + PDFA_2U(2, 'U'), + + PDFA_3A(3, 'A'), + PDFA_3B(3, 'B'), + PDFA_3U(3, 'U'); private final String name; diff --git a/src/java/org/apache/fop/pdf/PDFMetadata.java b/src/java/org/apache/fop/pdf/PDFMetadata.java index 58b164c8d..3af9af606 100644 --- a/src/java/org/apache/fop/pdf/PDFMetadata.java +++ b/src/java/org/apache/fop/pdf/PDFMetadata.java @@ -144,6 +144,9 @@ public class PDFMetadata extends PDFStream { //Dublin Core DublinCoreAdapter dc = DublinCoreSchema.getAdapter(meta); + //PDF/A identification + PDFAMode pdfaMode = pdfDoc.getProfile().getPDFAMode(); + dc.setCompact(pdfaMode.getPart() != 3); if (info.getAuthor() != null) { dc.addCreator(info.getAuthor()); } @@ -169,8 +172,6 @@ public class PDFMetadata extends PDFStream { pdfua.setPart(pdfuaMode.getPart()); } - //PDF/A identification - PDFAMode pdfaMode = pdfDoc.getProfile().getPDFAMode(); if (pdfaMode.isEnabled()) { PDFAAdapter pdfa = PDFAXMPSchema.getAdapter(meta); pdfa.setPart(pdfaMode.getPart());