Example usage for com.itextpdf.text Anchor Anchor

List of usage examples for com.itextpdf.text Anchor Anchor

Introduction

In this page you can find the example usage for com.itextpdf.text Anchor Anchor.

Prototype

public Anchor() 

Source Link

Document

Constructs an Anchor without specifying a leading.

Usage

From source file:org.sharegov.cirm.utils.PDFExportUtil.java

License:Apache License

private static void addContent(Document doc, Json data) throws DocumentException {
    Anchor anchor = new Anchor(); //new Anchor("First Chapter", catFont);
    //anchor.setName("First Chapter Anchor");

    Chapter catPart = new Chapter(new Paragraph(anchor), 1);
    catPart.setNumberDepth(0);/*from w w w. j av a  2s.  co  m*/
    Paragraph subPara = new Paragraph(); //new Paragraph("SubCategory 1", subFont);
    Section subCatPart = catPart.addSection(subPara);
    subCatPart.setNumberDepth(0);

    createTable(subCatPart, data);

    //Add everything to the document
    doc.add(catPart);
}

From source file:org.sharegov.cirm.utils.PDFViewReport.java

License:Apache License

private void addContent(Document d, Json data) {
    Anchor anchor = new Anchor();
    Chapter catPart = new Chapter(new Paragraph(anchor), 1);
    catPart.setNumberDepth(0);/*  w w w . j  a  va 2s.c o  m*/
    Paragraph subPara = new Paragraph(); //new Paragraph("SubCategory 1", subFont);
    Section subCatPart = catPart.addSection(subPara);
    subCatPart.setNumberDepth(0);

    try {
        addTopTable(subCatPart, data);
        addDescription(subCatPart, data);
        addQuestions(subCatPart, data);
        addActors(subCatPart, data);
        addActivities(subCatPart, data);
        d.add(catPart);
    } catch (Exception e) {
        e.printStackTrace();
        throw new RuntimeException("Problem during addContend for BO: " + data.toString(), e);
    }
}