List of usage examples for com.lowagie.text.pdf BaseField setFontSize
public void setFontSize(float fontSize)
From source file:buckley.compile.TextModifier.java
License:Apache License
public void modify(BaseField iTextField, TextField field, Document document) { FontRegistry fontRegistry = document.getFontRegistry(); BaseFont font = fontRegistry.getDefaultFont(); float size = fontRegistry.getDefaultFontSize(); if (field.getFontName() != null) { font = fontRegistry.getFont(field.getFontName()); }/* ww w.ja va 2 s . c o m*/ if (field.getFontSize() != null && field.getFontSize() > 0.0f) { size = field.getFontSize(); } iTextField.setFont(font); iTextField.setFontSize(size); }