Compliance with PDF standards


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.4PdfSpec.PDF_1_4 – Acrobat 5
  • PDF1.5PdfSpec.PDF_1_5 – Acrobat 6
  • PDF1.6PdfSpec.PDF_1_6 – Acrobat 7
  • PDF1.7PdfSpec.PDF_1_7 – Acrobat 8 / ISO 3200-1
  • PDF1.7ext1PdfSpec.PDF_1_7_1
  • PDF1.7ext2PdfSpec.PDF_1_7_2
  • PDF1.7ext3PdfSpec.PDF_1_7_3 – Acrobat 9
  • PDF1.7ext4PdfSpec.PDF_1_7_4
  • PDF1.7ext5PdfSpec.PDF_1_7_5
  • PDF1.7ext6PdfSpec.PDF_1_7_6
  • PDF1.7ext7PdfSpec.PDF_1_7_7
  • PDF1.7ext8PdfSpec.PDF_1_7_8 – Acrobat X
  • PDF1.7ext9PdfSpec.PDF_1_7_9
  • PDF1.7ext10PdfSpec.PDF_1_7_10
  • PDF1.7ext11PdfSpec.PDF_1_7_11 – Acrobat XI
  • PDF2.0PdfSpec.PDF_2_0

The PdfSpec parameter can be combined with one of PDF/A modifiers

  • PDF/A-1a:2005PdfSpec.PDFA_1A
  • PDF/A-1b:2005PdfSpec.PDFA_1B
  • PDF/A-2aPdfSpec.PDFA_2A
  • PDF/A-2bPdfSpec.PDFA_2B
  • PDF/A-2uPdfSpec.PDFA_2U
  • PDF/A-3aPdfSpec.PDFA_3A
  • PDF/A-3bPdfSpec.PDFA_3B
  • PDF/A-3uPdfSpec.PDFA_3U
  • PDF/A-4PdfSpec.PDFA_4 – requires PDF2.0
  • PDF/A-4ePdfSpec.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-1PdfSpec.PDFUA_1
  • PDF/UA-2PdfSpec.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:

  • ZUGFeRDPdfSpec.ZUGFeRD, which is PdfSpec.PDF_1_7.combine(PdfSpec.PDFA_3B)
  • ZUGFeRD (tagged)PdfSpec.ZUGFeRD_a, which is PdfSpec.PDF_1_7.combine(PdfSpec.PDFA_3A)
  • Factur-XPdfSpec.FacturX, which is PdfSpec.PDF_1_7.combine(PdfSpec.PDFA_3B)
  • Factur-X (tagged)PdfSpec.FacturX_a, which is PdfSpec.PDF_1_7.combine(PdfSpec.PDFA_3A)

 

NOTE: Not all the standards can be combined with each other. PdfSpec.combine() throws PdfSpecViolationException and PdfSpecUnsupportedException in incompatibility cases.

Creating DOCX Files


v4.0.19 introduces support for creating OOXML (DOCX) files from HTML.

It is already functionally superior to the long-standing PD4ML HTML to RTF converter. It allows you to define text and paragraph styles, nested tables, ordered and unordered lists, headers and footers, table of contents, hyperlinks, bookmarks, borders, backgrounds, and embed images.

To force DOCX output you only need to trigger pd4ml.writeDOCX() API method instead of pd4ml.writePDF() in usual conversion scenarios.

The converter is available under the PD4ML DMS or PD4ML UA license.

Read more: https://pd4ml.com/creation-of-ooxml-docx-documents/