PD4ML v4.1.0 introduces a new API method, pd4ml.writePDF(OutputStream, PdfSpec), which allows you to specify the required PDF standard compliance level.
Available options:
- PDF1.4 –
PdfSpec.PDF_1_4– Acrobat 5 - PDF1.5 –
PdfSpec.PDF_1_5– Acrobat 6 - PDF1.6 –
PdfSpec.PDF_1_6– Acrobat 7 - PDF1.7 –
PdfSpec.PDF_1_7– Acrobat 8 / ISO 3200-1 - PDF1.7ext1 –
PdfSpec.PDF_1_7_1 - PDF1.7ext2 –
PdfSpec.PDF_1_7_2 - PDF1.7ext3 –
PdfSpec.PDF_1_7_3– Acrobat 9 - PDF1.7ext4 –
PdfSpec.PDF_1_7_4 - PDF1.7ext5 –
PdfSpec.PDF_1_7_5 - PDF1.7ext6 –
PdfSpec.PDF_1_7_6 - PDF1.7ext7 –
PdfSpec.PDF_1_7_7 - PDF1.7ext8 –
PdfSpec.PDF_1_7_8– Acrobat X - PDF1.7ext9 –
PdfSpec.PDF_1_7_9 - PDF1.7ext10 –
PdfSpec.PDF_1_7_10 - PDF1.7ext11 –
PdfSpec.PDF_1_7_11– Acrobat XI - PDF2.0 –
PdfSpec.PDF_2_0
The PdfSpec parameter can be combined with one of PDF/A modifiers
- PDF/A-1a:2005 –
PdfSpec.PDFA_1A - PDF/A-1b:2005 –
PdfSpec.PDFA_1B - PDF/A-2a –
PdfSpec.PDFA_2A - PDF/A-2b –
PdfSpec.PDFA_2B - PDF/A-2u –
PdfSpec.PDFA_2U - PDF/A-3a –
PdfSpec.PDFA_3A - PDF/A-3b –
PdfSpec.PDFA_3B - PDF/A-3u –
PdfSpec.PDFA_3U - PDF/A-4 –
PdfSpec.PDFA_4– requires PDF2.0 - PDF/A-4e –
PdfSpec.PDFA_4E– requires PDF2.0
The combining can be done as follows:
pd4ml.writePDF(os, PdfSpec.PDFA_3B); // implicitly adds PDF1.7 conformance
pd4ml.writePDF(os, PdfSpec.PDF_1_7_8.combine(PdfSpec.PDFA_3B));
And also PDF or PDF/A-a can be combined with PDF/UA
- PDF/UA-1 –
PdfSpec.PDFUA_1 - PDF/UA-2 –
PdfSpec.PDFUA_2– requires PDF2.0
Examples:
pd4ml.writePDF(os, PdfSpec.PDFUA_1); // implicitly adds PDF1.7 conformance
pd4ml.writePDF(os, PdfSpec.PDF_1_7_8.combine(PdfSpec.PDFUA_1));
pd4ml.writePDF(os, PdfSpec.PDF_1_7_11.combine(PdfSpec.PDFA_3A).combine(PdfSpec.PDFUA_1));
There are also several predefined constants that combine PDF standards as required by XML invoicing specs:
- ZUGFeRD –
PdfSpec.ZUGFeRD, which isPdfSpec.PDF_1_7.combine(PdfSpec.PDFA_3B) - ZUGFeRD (tagged) –
PdfSpec.ZUGFeRD_a, which isPdfSpec.PDF_1_7.combine(PdfSpec.PDFA_3A) - Factur-X –
PdfSpec.FacturX, which isPdfSpec.PDF_1_7.combine(PdfSpec.PDFA_3B) - Factur-X (tagged) –
PdfSpec.FacturX_a, which isPdfSpec.PDF_1_7.combine(PdfSpec.PDFA_3A)
NOTE: Not all the standards can be combined with each other.
PdfSpec.combine()throwsPdfSpecViolationExceptionandPdfSpecUnsupportedExceptionin incompatibility cases.
