iText is a free and open source library for creating and manipulating
PDF documents in Java. The following example shows using various line separators in PDF document.
Document document = new Document(PageSize.A4);
PdfWriter.getInstance(document, new FileOutputStream("test20.pdf"));
//Open the document before adding any content
document.open();
Paragraph paragraph = new Paragraph("BE THE CODER");
document.add(paragraph);
document.add(Chunk.NEWLINE); //Blank line
document.add(new DottedLineSeparator()); //Dotted line
document.add(Chunk.NEWLINE); //Blank line
document.add(new LineSeparator()); //Thick line