In this example , we are going to explain how we
can make paragraph and how we can gives various alignment. To make a
paragraph we use Paragraph("Text") constructor . To gives
alignment we use setAlignment(int alignment).
Code Description:
setAlignment(int
alignment):
We can set the aligment of a Paragraph with the method setAlignment(int alignment). The alignment can be one of the following values:
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
The code of the program is given below:
import java.io.FileOutputStream;
|
The output of the program is given below:

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Make Paragraph and Set Alignment View All Comments
Post your Comment