List of usage examples for com.itextpdf.text.pdf BaseFont createFont
public static BaseFont createFont(PRIndirectReference fontRef)
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()); }