How to add XMP metadata viewable in the Adobe Acrobat GUI

Hi,

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 have tried following your guide Working with PDF File Metadata | C#|Aspose.PDF for .NET to add XMP data, and it sort of works.

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?

Kind regards…

Hi Michael,


Thanks
for using our products.

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.

We
apologize for your inconvenience.

Hi,


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.

Kind regards…

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.

Sorry for the inconvenience,

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.

Sorry for the inconvenience,

Thank you for your feedback. I will make a note of it in our own planning.


Kind regards…

Hi Michael,


Thanks for your patience. In order to resolve the issue PDFNEWNET-34478 reported earlier, please try using the following code snippet.

[C#]

Document doc = new
Document(…);<o:p></o:p>

doc.Info.Add("CustomProperty", "CustomValue");

doc.Metadata.RegisterNamespaceUri("pdfx", "http://ns.adobe.com/pdfx/1.3/");

doc.Metadata["pdfx:CustomProperty"] = "CustomValue";

doc.Save(...);


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.

Thank you - this works!

Kind regards...

The issues you have found earlier (filed as PDFNEWNET-34478) have been fixed in Aspose.Pdf for .NET 7.7.0.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.