How do I add custom namespace properties in XMP metadata when generating/converting to PDF/A?

87 views
Skip to first unread message

Support

unread,
Apr 23, 2013, 7:33:52 PM4/23/13
to pdfne...@googlegroups.com
Q:
 
For PDF/A conversion we rely on 'pdftron.PDF.PDFA.PDFACompliance'  from PDFTron PDFNet SDK.
 
The conversion works great, however I would like to be able to add some custom properties / metadata (i.e. extended XMP metadata in a custom namespace ).
 

--------

 A:
 
If you need to have a tight control over XMP metadata in the final PDF/A output, you could:

a) Load initla XMP metadata from PDF (see https://groups.google.com/d/msg/pdfnet-sdk/9IOo9GhDUbg/QyrE192IK4MJ).

b) Convert to PDF/A

c) Overwrite the original metadata with your own version (this is also covered in the above article).

 

Since XMP is just XML it seems that it could be vairly easily manipulated with .NET XML utilities (e.g. XDocument, XML to LINQ, etc... http://www.dotnetcurry.com/ShowArticle.aspx?ID=564 ).

Note:  If you are targeting PDF/A-1 please make sure to use SDFDoc.SaveOptions.e_compatibility flag in the call to save: 

    

    doc.Save("my.pdf", SDFDoc.SaveOptions.e_compatibility);

 

The problem is that PDF/A 1 - does not support compressed PDF streams, so failing to use the flag could introduce compatibility issue relared to 'compressed object streams'

 

Reply all
Reply to author
Forward
0 new messages