iTextSharp is a popular open-source library for creating and manipulating PDF files in C#. It provides a PdfDictionary class for working with PDF dictionary objects.
A PDF dictionary is a collection of key-value pairs used to define attributes and properties of PDF objects. The PdfDictionary class allows you to create, manipulate, and access these dictionaries in your PDF files.
Here are some code examples using PdfDictionary in iTextSharp:
1. Creating a new dictionary object:
PdfDictionary dict = new PdfDictionary();
2. Adding key-value pairs to the dictionary:
dict.Put(new PdfName("Title"), new PdfString("My Document")); dict.Put(new PdfName("Author"), new PdfString("John Doe"));
3. Retrieving a value from the dictionary:
PdfString title = dict.GetAsString(new PdfName("Title"));
In these examples, we are creating a new PdfDictionary object, adding some key-value pairs to it, and retrieving a value from it. We can use this functionality to customize the attributes of our PDF files.
The PdfDictionary class is part of the iTextSharp.text.pdf package library, which contains classes for working with PDF files in iTextSharp.
C# (CSharp) iTextSharp.text.pdf PdfDictionary - 60 examples found. These are the top rated real world C# (CSharp) examples of iTextSharp.text.pdf.PdfDictionary extracted from open source projects. You can rate examples to help us improve the quality of examples.