SetMetadata + PDFConformance PDF/A-3a

Discussions about PDF management.
Post Reply
marco
Posts: 12
Joined: Mon Sep 17, 2018 11:57 am

SetMetadata + PDFConformance PDF/A-3a

Post by marco » Tue Jun 25, 2019 9:06 pm

Hi,

I have a PDF, but I need to do 3 things with this existing PDF.
1. Embedd an existing file in the PDF.
2. Add specific metadata to the PDF (I use actually SetMetadata() )
3. Save the document as PDF/A-3a

Adding the xml is no problem.

BUT:
I can add metadata to the PDF using SetMetata() and save the PDF. Now I need to convert this PDF to PDF/A-3a. Converting this PDF to PDF/A-3a, I will loose my metadata in the result PDF file.
If I do it the other way around, first create the PDF/A-3a and after that add the metadata, I will loose the PDF/A-3a conformance in the result file.

What I am doing wrong and what would be the way to get this done?

Thank you and kind regards, Marco

Matus
Posts: 9
Joined: Tue Jan 15, 2019 1:00 pm

Re: SetMetadata + PDFConformance PDF/A-3a

Post by Matus » Wed Jun 26, 2019 11:39 am

Hi Marco,

In order to make sure the output PDF/A documents are valid we are rebuilding the metadata from scratch during the conversion. This means that if you need to add specific metadata to the resulting PDF/A3 document you will need to modify the metadata after the conversion. To do this you will need to first extract the existing metadata using the GetMetadata method, modify them by adding your values, and save them back to the PDF using SetMetadata method. You will need to parse the Metadata and modify the nodes and values correctly. XMLReader class in .Net that can be used for this. Important point here is that you need to modify the metadata in a way that you do not invalidate the existing metadata and the new metadata entries need to be conformant under XMP 2005 specification.

marco
Posts: 12
Joined: Mon Sep 17, 2018 11:57 am

Re: SetMetadata + PDFConformance PDF/A-3a

Post by marco » Thu Jun 27, 2019 12:56 pm

Hi Matus,

This was exactly what I needed! Thank you. I was able to implement as I need it.

Best regards, Marco

Gabriela
Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: SetMetadata + PDFConformance PDF/A-3a

Post by Gabriela » Thu Jul 11, 2019 1:44 pm

Hi, Marco,

Thank you for your return. We really appreciate it.
Do not hesitate to contact us in the future if you will need further assistance.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest