iTextSharp.text.pdf is a package library for generating and manipulating PDF files using C#. The PdfName DecodeName is a method used to decode a PDF Name object into a string.
Example 1:
PdfName name = new PdfName("/Name"); string decodeName = name.DecodeName(); Console.WriteLine(decodeName); // Prints "Name"
In this example, we create a PdfName object and call the DecodeName method to decode the name "/Name" into the string "Name". The decoded string is then printed to the console.
Example 2:
PdfName name = new PdfName("/Test#20Name"); string decodeName = name.DecodeName(); Console.WriteLine(decodeName); // Prints "Test Name"
In this example, we create a PdfName object with a name that contains a space. However, spaces are not allowed in PDF names, so the space is encoded as "#20". We then call the DecodeName method to decode the name "/Test#20Name" into the string "Test Name". The decoded string is then printed to the console.
This code uses the iTextSharp.text.pdf package library.
C# (CSharp) iTextSharp.text.pdf PdfName.DecodeName - 19 examples found. These are the top rated real world C# (CSharp) examples of iTextSharp.text.pdf.PdfName.DecodeName extracted from open source projects. You can rate examples to help us improve the quality of examples.