Skip to main content
PDF Profiles

PDF Profiles via HTML to PDF

Jonathon Fruchte avatar
Written by Jonathon Fruchte
Updated over a year ago

In this guide, we will explain what PDF profiles are and how you can use them effectively in your HTML to PDF document generation process. Many open-source HTML to PDF libraries do not support these profiles, but DocRaptor does!

What are PDF Profiles?

A PDF profile is a set of standards determining how a specific type of PDF should be created, ensuring consistency and compatibility across different devices and platforms.

Some common PDF profiles include:

  • PDF/A: Used for long-term archiving

  • PDF/X: Designed for the exchange and printing of graphics files

  • PDF/UA: Aimed at creating universally accessible documents for people with disabilities

Sometimes, particular profiles are required by legal regulations, vendors, or industry standards. If you're not required to use a profile, you probably don't need to.

Using PDF Profiles with DocRaptor

Each PDF profile places restrictions on the features allowed in a PDF file in order to achieve its aims. When you set a PDF with DocRaptor, our PDF generator, Prince, will try to protect you from creating a document that conflicts with your selected profile. For example, we'll disable particular PDF functionality to keep you in compliance.

However, we can't guarantee your document will definitively meet the profile standards. For example, accessible documents require that your elements be accurately tagged and ordered—and that's up to you.

Setting Document Profile

Simply set the prince_options[profile] API parameter or the matching option in your DocRaptor client, to your desired profile. The API documentation contains a list of possible profiles.

Further Documentation

We've created an entire page on creating accessible HTML to PDF documents with the PDF/UA profile. For other profiles, we suggest reviewing Prince's documentation. You may also want to review the outputted document in Adobe Acrobat's preflight profile tool.

Did this answer your question?