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 01:22 PM UTC

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 01:27 PM UTC

Hi, this works. Thank you.


Loader.
Up arrow icon