List of usage examples for com.itextpdf.text Anchor setName
public void setName(final String name)
Anchor
. From source file:sipl.recursos.GenerarPDFtipomaterial.java
private static void addContent(Document document) throws DocumentException { Anchor anchor = new Anchor(Titulo, catFont); anchor.setName(Titulo); Chapter catPart = new Chapter(new Paragraph(anchor), 1); Paragraph subPara = new Paragraph("", subFont); Section subCatPart = catPart.addSection(subPara); createTable(subCatPart);//from w ww . ja v a 2 s. co m document.add(catPart); }
From source file:uk.ac.openmf.utils.OpenMFPDFGenerator.java
public static void addContent(Document document, String title, String clientId) throws DocumentException { Anchor anchor = new Anchor(title, catFont); anchor.setName(title); // Second parameter is the number of the chapter Chapter catPart = new Chapter(new Paragraph(anchor), 1); Paragraph subPara = new Paragraph("Loan Account Overview", catFont); addEmptyLine(subPara, 1);/*from w w w.j av a2 s. c om*/ Section subCatPart = catPart.addSection(subPara); // add a table createLAOTable(subCatPart, clientId); Paragraph subPara1 = new Paragraph("Savings Account Overview", catFont); addEmptyLine(subPara1, 1); Section subCatPart1 = catPart.addSection(subPara1); // add a table createSAOTable(subCatPart1, clientId); // now add all this to the document document.add(catPart); }
From source file:uk.ac.openmf.utils.OpenMFPDFGenerator.java
public static void addTaskContent(Document document, String title, String omfuId) throws DocumentException { Anchor anchor = new Anchor(title, catFont); anchor.setName(title); // Second parameter is the number of the chapter Chapter catPart = new Chapter(new Paragraph(anchor), 1); Paragraph subPara = new Paragraph("User Tasks Overview", catFont); addEmptyLine(subPara, 1);// ww w .j ava2s . c o m Section subCatPart = catPart.addSection(subPara); // add a table createTasksTable(subCatPart, omfuId); // now add all this to the document document.add(catPart); }
From source file:wtw.ui.GeneratingPdfAction.java
private static void addContent(Document document) throws DocumentException { Anchor anchor = new Anchor("First Chapter", catFont); anchor.setName("First Chapter"); // Second parameter is the number of the chapter Chapter catPart = new Chapter(new Paragraph(anchor), 1); Paragraph subPara = new Paragraph("Subcategory 1", subFont); Section subCatPart = catPart.addSection(subPara); subCatPart.add(new Paragraph("Hello")); subPara = new Paragraph("Subcategory 2", subFont); subCatPart = catPart.addSection(subPara); subCatPart.add(new Paragraph("Paragraph 1")); subCatPart.add(new Paragraph("Paragraph 2")); subCatPart.add(new Paragraph("Paragraph 3")); // Add a list Paragraph paragraph = new Paragraph(); addEmptyLine(paragraph, 5);/* ww w. j a v a 2 s .c o m*/ subCatPart.add(paragraph); // Add a table createTable(subCatPart); // Now add all this to the document document.add(catPart); // Next section anchor = new Anchor("Second Chapter", catFont); anchor.setName("Second Chapter"); // Second parameter is the number of the chapter catPart = new Chapter(new Paragraph(anchor), 1); subPara = new Paragraph("Subcategory", subFont); subCatPart = catPart.addSection(subPara); subCatPart.add(new Paragraph("This is a very important message")); // Now add all this to the document document.add(catPart); }