We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Custom Properties for pdf

Hi Team,

I am intended to use custom properties for Aspose Pdf.

Like we have for excel: workbook.CustomDocumentProperties.Add(“MyDate”, dt);
For Word we have: wordDoc.CustomDocumentProperties.Add(“Language”, docLanguage);

How can I achieve the same using Aspose pdf.


Thanks for contacting support.

You may please use following code snippet, in order to add custom metadata information in PDF documents:

Document doc = new Document(@"C:\Sample.pdf");
doc.Metadata.RegisterNamespaceUri("xmp", "http://ns.adobe.com/xap/1.0/"); 
doc.Metadata["xmp:ModifyDate"] = DateTime.Now;

In case you face any issue, please share your sample PDF document with us. We will test the scenario in our environment and address it accordingly.