Java Code Examples for com.itextpdf.text.Paragraph#setSpacingAfter()
The following examples show how to use
com.itextpdf.text.Paragraph#setSpacingAfter() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RootTitle.java From xiaoyaoji with GNU General Public License v3.0 | 5 votes |
public RootTitle(Document doc, String title) { Paragraph placeHolder = new Paragraph("\n"); placeHolder.setSpacingAfter(doc.getPageSize().getHeight() * 0.1f); add(placeHolder); Paragraph p = new Paragraph(title, new Font(BaseInfo.cjkFont, 24f, Font.BOLD, BaseColor.BLACK)); p.setAlignment(ALIGN_CENTER); p.setSpacingAfter(100); add(p); }
Example 2
Source File: NormalTitle.java From xiaoyaoji with GNU General Public License v3.0 | 5 votes |
public NormalTitle(String title, int number) { super(number); Paragraph titlePara = new Paragraph(title, font); titlePara.setSpacingAfter(DEFAULT_MARGIN); titlePara.setSpacingBefore(DEFAULT_MARGIN); setTitle(titlePara); setTriggerNewPage(false); }
Example 3
Source File: NormalSubTitle.java From xiaoyaoji with GNU General Public License v3.0 | 5 votes |
public NormalSubTitle(Paragraph parent, String title, int index) { setFont(font); Paragraph titlePara = new Paragraph(title, font); titlePara.setSpacingAfter(DEFAULT_MARGIN); titlePara.setSpacingBefore(DEFAULT_MARGIN); add(titlePara); if (parent != null) { parent.add(index, this); } }
Example 4
Source File: NormalSubTitle.java From xiaoyaoji with GNU General Public License v3.0 | 5 votes |
public NormalSubTitle(Paragraph parent, String title, int index, float vMargin) { setFont(font); Paragraph titlePara = new Paragraph(title, font); titlePara.setSpacingAfter(vMargin); titlePara.setSpacingBefore(vMargin); add(titlePara); if (parent != null) { parent.add(index, this); } }