

SubsequentLinesIndent = 20 // Specify the location to add TextParagraph TextParagraph paragraph = new TextParagraph () // Set subsequent lines indent Add () TextBuilder builder = new TextBuilder ( page ) // Create text paragraph
HOW TO INSERT TEXT IN A PDF HOW TO
The following code snippet shows you how to add text in PDF document using TextParagraph class.ĭocument doc = new Document () // Add page to pages collection of Document object TextFragment textFragment = new TextFragment ( "Hello world" ) if ( fontFile != "" ) Add Text using TextParagraph Pages ) // Create text fragment with sample string TextBuilder textBuilder = new TextBuilder ( doc. GetDataDir_AsposePdf_Text () string fontFile = "" // Load input PDF fileĭocument doc = new Document ( dataDir + "input.pdf" ) // Create text builder object for first page of document The following code snippet shows how to load Font from Stream object when adding text to PDF document. Save ( dataDir ) Loading Font from Stream AppendText ( textFragment ) dataDir = dataDir + "AddText_out.pdf" // Save resulting PDF document. TextBuilder textBuilder = new TextBuilder ( pdfPage ) // Append the text fragment to the PDF page FindFont ( "TimesNewRoman" ) textFragment. Position = new Position ( 100, 600 ) // Set text properties TextFragment textFragment = new TextFragment ( "main text" ) textFragment. GetDataDir_AsposePdf_Text () // Open documentĭocument pdfDocument = new Document ( dataDir + "input.pdf" ) // Get particular page For complete examples and data files, please go to The following code snippet shows you how to add text in an existing PDF file.

This entry was posted in How to and tagged Foxit PhantomPDF, foxit reader, image editing, PDF editing, phantompdf, text editing. And if you’re in need of next-level PDF editing capabilities, Foxit PhantomPDF can take you there, too. Once you’re done making your changes, be sure to run a spell check on your content to ensure you didn’t create any typos.Īs you can see, making basic text changes in Foxit PhantomPDF is straightforward and easy. You can change the alignment of the text, change its size, make it bold or even italicize it. To change the way text appears in your PDF file, simply select the text you’re editing then use the EDIT tab to select a different font type, adjust size, change the margins of a content block and modify the paragraph alignment and spacing. But that’s not all the text editing you can do with PhantomPDF. Or type your new text right over the highlighted text. To delete it, select the text you want to remove then hit backspace.To change text, simply locate it and click to highlight it, then type your new text.Click on the ‘Edit Text’ button near the top-center of the screen.With the Edit Text command, you can edit text in a paragraph in nearly the same way you’d do it in Microsoft Office Word as well as changing the font, font size and color. PhantomPDF enables you to annotate text, add notes, highlight, underline, strikeout text and more, then save the changes to your newly edited PDF.
HOW TO INSERT TEXT IN A PDF FREE
While Foxit PDF Reader offers plenty of advanced features for PDF modification, such as creating bookmarks, adding links, attaching files, adding images, playing and inserting multimedia files, and even running JavaScript on PDF files, it’s not meant for editing text.įoxit PhantomPDF is a full-fledged text editor and you can try it free What are your options?ĭoes Foxit PDF Reader enable you to edit text? Yet there are times you need to be able to edit text, like changing a headline, deleting a sentence or adding a paragraph on a PDF page.
:max_bytes(150000):strip_icc()/005-how-to-add-text-to-a-pdf-file-3be81c06b5934cbf91854b8cb2fb4954.jpg)
We all know that PDF is designed to create content that preserves look and feel on any platform but is unchangeable.
