I have had a look at adding XMP metadata to PDF documents. Specifically I would like to add data that can be viewed in the Adobe Acrobat GUI (File / Properties… / Custom) Also see attachment.
I can see in the PDF document viewed in Notepad++ that the field I am trying to add is actually being added to the document, but it is not viewable in the Adobe Acrobat GUI. Adding data from the Adobe Acrobat GUI actually adds into the namespace pdfx, so my code has to reflect that. This is what I ended up doing:
using(var xmpMetaData = new PdfXmpMetadata())
using (var input = new FileStream(InputFilename, FileMode.Open))
{
xmpMetaData.BindPdf(input);
xmpMetaData.RegisterNamespaceURI(“pdfx”, “http://ns.adobe.com/pdfx/1.3/”);
xmpMetaData.Add(“pdfx:Test1”, “Test2”);
using (var output = new FileStream(OutputFilename, FileMode.Create))
{
xmpMetaData.Save(output);
}
}
Well, it still does not show up in the Adobe Acrobat GUI. What am I doing wrong?
I
have tested the scenario and I am able to reproduce the same problem that with current release version fo Aspose.Pdf for .NET, Metadata information is not being set in PDF file. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-34478. We
will investigate this issue in details and will keep you updated on the status
of a correction.
Just writing to ask if you have any idea of when this functionality will be available. I can see that the issue was not included in your latest release 7.5.0.
Hi Michael,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I have asked the
development team to share an ETA regarding the resolution of your issue. As soon
as I get a feedback, I will update you via this forum thread.
Hi
Michael,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I
have received a feedback from the development team and your issue is scheduled
to be fixed in the month of January 2013. As per the plan, the fix will be
included in our February 2013 release. However, it is not a promise and in case
of any change in the plan / schedule (due to any high priority tasks), we will
update you via this forum thread.
Please note that PDF document contains two independent sources of metadata (Document::Info and Document::Metadata). So the correct approach of adding medatada is to use both approaches simultaneously.