It also enables you to converting HTML, XSL-FO and Excel files into PDF. Now you can create PDF by API, XML and XSL-FO files. It supports Floating box, PDF form field, PDF attachments, security, Foot note & end note, Multiple columns document, Table of Contents, List of Tables, Nested tables, Rich text format, images, hyperlinks, JavaScript, annotation, bookmarks, headers, footers and many more.
append the text fragment to the PDF pageĪspose.Pdf is a Java PDF component to create PDF documents without using Adobe Acrobat. TextFragment.getTextState().setBackgroundColor(Color.GRAY) Ĭom. textBuilder = new (pdfPage) TextFragment.getTextState().setForegroundColor(Color.BLUE)
TextFragment.getTextState().setFontSize(14) TextFragment.getTextState().setFont(.findFont("Verdana")) Strong-color borders create contrast and highlight the essential pages in your document. Upload your document, locate the background tool on the left, increase padding to your liking, and choose the right border color. You can add PDF borders with only a few clicks. After that create a TextFragment object with the input text along with other text properties.
ADD BORDER TO TEXT PDN HOW TO
The following code snippet shows you how to add text in an existing PDF file.Ĭom. pdfDocument = new ("input.pdf") Ĭom. pdfPage = pdfDocument.getPages().get_Item(1) Ĭom. textFragment = new ("main text") Good Annotations brings a fast, reliable, and free PDF editor. To add text to an existing PDF file Open the input PDF using the Document object and get the particular page to which you want to add the text. Now just call the Document object's Save method and save the output PDF file. The TextBuilder object created from that particular page – to which you want to add the text – allow you to add the TextFragment object to the page using the AppendText method.
To add text to an existing PDF file Open the input PDF using the Document object and get the particular page to which you want to add the text. This technical tip shows how to Java Developers can add text in an existing PDF file using Aspose.Pdf for Java.