We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to set custom PDF information

Hi,

I am trying to set custom PDF information that is shown in AdobeReader in this position

Unbenannt.JPG

I tried to set this with 

pdfViewer.LoadedDocument.DocumentInformation.CustomMetadata.Add("trallala", "hopsasa")

But the metadata is not added. Trying to set Author or Title of the document works fine.

What I am doing wrong?

Thank you, Marco


2 Replies 1 reply marked as answer

KG Krithika Ganesan Syncfusion Team November 17, 2022 08:22 AM

Please use the below code snippet to add metadata to the existing pdf document:

pdfViewer.LoadedDocument.DocumentInformation.CustomMetadata["trallala"] = "hopsasa";
pdfViewer.Save("MetaData.pdf");



Please try this in your end and let us know the result.


Marked as answer

MU Marco Uffelmann November 17, 2022 08:27 AM

Hi, this works. Thank you.


Loader.
Live Chat Icon For mobile
Up arrow icon