Example usage for com.itextpdf.text.pdf PdfName DR

List of usage examples for com.itextpdf.text.pdf PdfName DR

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf PdfName DR.

Prototype

PdfName DR

To view the source code for com.itextpdf.text.pdf PdfName DR.

Click Source Link

Document

A name

Usage

From source file:mkl.testarea.itext5.pdfcleanup.StrictPdfCleanUpProcessor.java

License:Open Source License

private Font retrieveFontFromAcroForm(PdfName fontName, PdfNumber size) {
    PdfIndirectReference fontIndirReference = pdfStamper.getReader().getAcroForm().getAsDict(PdfName.DR)
            .getAsDict(PdfName.FONT).getAsIndirectObject(fontName);
    BaseFont bfont = BaseFont.createFont((PRIndirectReference) fontIndirReference);

    return new Font(bfont, size.floatValue());
}