title: How do I change font size in a rendered PDF doc in iText?
body: <p>I’m using iText 2.1.7, included through the following dependency …</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;com.lowagie&lt;/groupId&gt;
          &lt;artifactId&gt;itext&lt;/artifactId&gt;
          &lt;version&gt;2.1.7&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>How do I change the text size of a PDF field in a PDF I’m trying to export?  I created a PDF template using OpenOffice 4.1.0 and then have tried this code to set the text size:</p>
  
  <pre><code>            final PdfReader pdfTemplate = new PdfReader(pdfTemplateFile.toString());
              // Prepare to generate a byte output stream
              ByteArrayOutputStream out = new ByteArrayOutputStream();
              PdfStamper stamper = new PdfStamper(pdfTemplate, out);
              stamper.setFormFlattening(true);
      …
              stamper.getAcroFields().setField(PARTICIPANT_FIELD_NAME, user.getFirstName() + " " + user.getLastName());
              stamper.getAcroFields().setFieldProperty(PARTICIPANT_FIELD_NAME, "textsize", new Float(36), null);
              final BaseFont font = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.EMBEDDED);
              stamper.getAcroFields().setFieldProperty(PARTICIPANT_FIELD_NAME, "textfont", font, null);
  </code></pre>
  
  <p>No matter what value I put in between “new Float(xxx)”, the font size is always rendered the same.  Where am I going wrong?</p>