

Get the text state for the text that the TextSegment object represents by calling Text.TextState() method.Create a TextSegment object to add a text segment in a PDF document.Initialize an instance of TextFragment class with an empty string.Create a page in a PDF document by calling Pages.Add() method.Create an object of the Document class.Now, we can dive further and can explore other features such as adding a font to the PDF file programmatically. Save the document by calling the Save method.Add fragment to the paragraphs collection by calling Paragraphs.Add method.Create an object of TextFragment class and add a string inside the segment.Create a page in the PDF document by calling Pages.Add() method.


