P. Oring
P. Oring

Reputation: 23

How to merge PDFs into a PDFA1b with watermarks using iText5

Here is what I need to do:

It has to be with iText 5

I have looked at this official merging example: http://developers.itextpdf.com/examples/merging-pdf-documents/adding-cover-page-existing-pdf

But can this method be used to create a PDFA, and also add watermarks? Or am I stuck with using this other method which he specifically says not to use: http://developers.itextpdf.com/examples/merging-pdf-documents-itext5/how-not-merge-documents

Upvotes: 1

Views: 309

Answers (1)

joelgeraci
joelgeraci

Reputation: 4917

You can create files that conform to PDF/A-1b with just about any PDF library including iText. PDF/A, in general, is a subset of ISO 32000 (PDF) so it's really just a matter of using the tool to do what you need to with the files but not adding anything that is forbidden by PDF/A-1b (in your case).

The thing to be aware of is that iText or any of the other libraries that "support" PDF/A, will not prevent you from modifying PDF in a way that is forbidden by PDF/A... you just need to know what those things are.

So... before merging, you'll want to be sure that the input files don't have any annotations or form fields or any other interactive content.

After merging, add your watermark as page content and be sure your XMP metadata is conforming and you should be OK.

Upvotes: 1

Related Questions