ITEXT PDF / CATATAN</>↗iText PDF14 Des 2011
The com.itextpdf.text.Anchor class in iText can be used to create an internal link or external link in a PDF document. To create an internal link we must format the anchor reference using the # + referenceName. On the other side the target anchor should be named using the same reference name excluding the # symbol. […]
ITEXT PDF / CATATAN</>↗iText PDF13 Des 2011
This brief example show you how to create chapter in the PDF document using iText. To create chapter we use the com.itextpdf.text.Chapter class. We can pass the chapter title and the chapter number as the parameter for the Chapter constructor. To create a section for the chapter we can use the com.itextpdf.text.Section class. To add […]
ITEXT PDF / CATATAN</>↗iText PDF13 Des 2011
This example show you how to use the com.itextpdf.text.Anchor class to create an external link in the PDF document. You can create an instance of Anchor with a phrase of string and set its reference, in this case a website URL, by calling the setReference() method of this object. package org.kodejava.itextpdf; import com.itextpdf.text.Anchor; import com.itextpdf.text.Document; […]
ITEXT PDF / CATATAN</>↗iText PDF11 Des 2011
To set paragraph indentation in the iText Paragraph object we can use the setFirstLineIndent(), setIndentationLeft() and setIndentationRight(). These methods accept a float value as a parameter. The setFirstLineIndent() method set the first line indentation of a paragraph, while the setIndentationLeft() and setIndentationRight() methods set the left and the right indent of the paragraph. Let see […]
ITEXT PDF / CATATAN</>↗iText PDF07 Des 2011
To set the alignment of a paragraph object we can use the Paragraph.setAlignment() method. We can pass constants such as Paragraph.ALIGN_LEFT, Paragraph.ALIGN_CENTER, Paragraph.ALIGN_RIGHTto the setAlignment() method. package org.kodejava.itextpdf; import com.itextpdf.text.Chunk; import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException; import com.itextpdf.text.Paragraph; import com.itextpdf.text.pdf.PdfWriter; import java.io.FileNotFoundException; import...
ITEXT PDF / CATATAN</>↗iText PDF06 Des 2011
To set the line spacing of a paragraph in iText can be done by passing the line space / leading argument in the Paragraph constructor. In the example below we set the line space to 32. We can also set the space between paragraph by calling the setSpacingBefore() and setSpacingAfter() methods of this object. package […]