public Paragraph createDescriptionParagraph(String text) { Chunk chunk = new Chunk(text, utils.createDefaultFont(STANDARD_FONT_SIZE, NORMAL)); Paragraph paragraph = new Paragraph(chunk); paragraph.setFirstLineIndent(DESCRIPTION_FIRST_LINE_INDENT); paragraph.setAlignment(Element.ALIGN_JUSTIFIED); return paragraph; }
private static Paragraph createCleanParagraph(String txt1, float fontSize1, boolean bold1) { Phrase phrase = new Phrase(txt1); phrase.getFont().setSize(fontSize1); if (bold1) { phrase.getFont().setStyle(Font.BOLD); phrase.setLeading(fontSize1); } Paragraph paragraph = new Paragraph(phrase); paragraph.setLeading(fontSize1); paragraph.setSpacingBefore(0); paragraph.setSpacingAfter(0); paragraph.setExtraParagraphSpace(0); paragraph.setFirstLineIndent(0); paragraph.setIndentationLeft(0); paragraph.setIndentationRight(0); paragraph.setAlignment(Rectangle.ALIGN_CENTER); return paragraph; }