Example usage for com.lowagie.text.pdf PdfName TEXT

List of usage examples for com.lowagie.text.pdf PdfName TEXT

Introduction

In this page you can find the example usage for com.lowagie.text.pdf PdfName TEXT.

Prototype

PdfName TEXT

To view the source code for com.lowagie.text.pdf PdfName TEXT.

Click Source Link

Document

A name

Usage

From source file:net.sf.jasperreports.engine.export.JRPdfExporterTagHelper.java

License:Open Source License

/**
 *
 *///w  w w.j  a  va 2s. c  o m
protected void init(PdfContentByte pdfContentByte) {
    this.pdfContentByte = pdfContentByte;

    if (isTagged) {
        PdfStructureTreeRoot root = pdfWriter.getStructureTreeRoot();
        allTag = new PdfStructureElement(root, new PdfName("All"));
        root.mapRole(new PdfName("All"), new PdfName("Sect"));
        if (pdfWriter.getPDFXConformance() == PdfWriter.PDFA1A) {
            root.mapRole(new PdfName("Anchor"), PdfName.NONSTRUCT);
            root.mapRole(PdfName.TEXT, PdfName.SPAN);
            root.mapRole(PdfName.IMAGE, PdfName.FIGURE);
        } else {
            root.mapRole(new PdfName("Anchor"), PdfName.TEXT);
        }

        if (language != null) {
            allTag.put(PdfName.LANG, new PdfString(language));
        }
        tagStack = new Stack<PdfStructureElement>();
        tagStack.push(allTag);
    }
}

From source file:net.sf.jasperreports.engine.export.JRPdfExporterTagHelper.java

License:Open Source License

protected void startText() {
    if (isTagged) {
        //         PdfStructureElement parentTag = tableCellTag == null ? (tableHeaderTag == null ? allTag : tableHeaderTag): tableCellTag;
        //         PdfStructureElement textTag = new PdfStructureElement(parentTag, PdfName.TEXT);
        PdfStructureElement textTag = new PdfStructureElement(tagStack.peek(), PdfName.TEXT);
        pdfContentByte.beginMarkedContentSequence(textTag);
    }//from w ww  .  j  av  a 2 s .  co m
}