Page 1 of 1

SetMetadata + PDFConformance PDF/A-3a

Posted: Tue Jun 25, 2019 9:06 pm
by marco
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

Re: SetMetadata + PDFConformance PDF/A-3a

Posted: Wed Jun 26, 2019 11:39 am
by Matus
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.

Re: SetMetadata + PDFConformance PDF/A-3a

Posted: Thu Jun 27, 2019 12:56 pm
by marco
Hi Matus,

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

Best regards, Marco

Re: SetMetadata + PDFConformance PDF/A-3a

Posted: Thu Jul 11, 2019 1:44 pm
by Gabriela
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.