Information dictionary: adding custom data to a PDF in Xamarin

To add custom data to an existing document.

C#

1// In case you have PDFDoc you can always access
2// SDF/Cos document using PDFDoc.GetSDFDoc() method
3SDFDoc doc = new SDFDoc(filename);
4Obj trailer = doc.GetTrailer(); // Get the trailer
5
6// Create an Info dictionary
7Obj info = trailer.PutDict("Info");
8info.PutString("Producer", "Apryse PDFNet");
9
10// Create a custom inline dictionary within Info dictionary
11Obj custom_dict = info.PutDict("My Direct Dict");
12custom_dict.PutNumber("My Number", 100);

Cos/SDF low-level API to edit PDF files
Full code sample which illustrates how to use basic Cos/SDF API to edit an existing document.

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales