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

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

Introduction

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

Prototype

PdfName LANG

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

Click Source Link

Document

A name

Usage

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

License:Open Source License

/**
 *
 *///from www .j ava  2 s . co  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);
    }
}