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

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

Introduction

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

Prototype

PdfName NONSTRUCT

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

Click Source Link

Document

A name

Usage

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

License:Open Source License

/**
 *
 *//* ww  w  .j ava  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);
    }
}