Cracking the Code: Document Conversion to Meet PDF Standards

Cracking the Code: Document Conversion to Meet PDF Standards

Published January 18, 2023

Standard formats for PDF were created to define quality requirements that ensure interoperability and simplify compliance. ISO defined these standards to guarantee reliable PDF processing for the many PDF creation programs that exist. In the Adobe PDF Library, we have several ways to convert your documents into PDFs that meet ISO standards, including PDF/A for archiving and PDF/X for printing. Let’s take a look at a few of the code samples in APDFL that demonstrate how those conversions work.

Note: The samples in this post are written in C++, but other samples are available for .NET Framework and Java.

Download a free trial of Adobe PDF Library 

 

PDF/A for long-term archiving

PDF/A was first published in late 2005 as ISO 19005-1. Businesses and public institutions benefit from PDF/A because digital documents can be archived permanently using this standard. While the format was initially used as a replacement for scanned paper or TIFFs in archives, it is now also used predominantly for digitally created documents (source: PDF Association). 

ConvertToPDFA is a code sample that converts a PDF document to a PDF/A compliant document. If you’re familiar with PFD/A, you know that there are different levels, depending on the type of compliance you need (PDF/A-1, 2, 3, etc.)

Read  “Get To Know PDF/A – Parts 2 & 3 And ZUGFeRD Support” to learn more about PDF/A compliance levels. 

In this portion of the code sample, you can see how to select your conversion option to the level you need. If the level is not specified, it will default to PDF/A – 3b. 

code pdfa.png

ZUGFeRD Standard for Invoice Archiving 

ZUGFeRD is an invoice standard based on PDF/A-3 plus XML data. It has been experiencing a surge in interest over the past few years, and there is a big push for governments to use it to standardize their invoicing systems. 

The ConvertToZUGFeRD sample converts a PDF document and an Invoice XML document to a ZUGFeRD compliant PDF document. This sample program illustrates how to easily convert a PDF document to PDF/A-3, how to add the ZUGFeRD XML invoice as an attachment to the document, and how to add the metadata entries unique to ZUGFeRD and the required extension, which are not part of the PDF/A-3 standard itself.

code zugferd.png


Are you prepared for the 2025 ZUGFeRD updates? Read our series to learn more:

How PDFs will be Affected by ZUGFeRD in 2025
 

A Timeline of ZUGFeRD Updates
 

ZUGFeRD is Coming, Are Your PDFs Compliant?



PDF/X – standard for the printing industry

In the printing and prepress sector, PDF files are the “raw material” from which printing is done. The industry formulated corresponding requirements shortly after PDF’s existence and developed PDF/X (“X” stands for “eXchange”) under the umbrella of ISO. The purpose of PDF/X is to facilitate graphics exchange, and it, therefore, has a series of printing-related requirements which do not apply to standard PDF files. 

The ConvertToPDFXsample converts a PDF document to a PDF/X compliant document.

code pdfx1.png

code pdfx2.png

We invite you to check out the Datalogics GitHub Repository for more information on Adobe PDF Library and samples for the creation, modification and management of PDF documents.

Streamline your development workflow 

Start a free trial and discover how our PDF SDK can minimize your development time.