title: Suddenly start getting font not available error from pdfbox library
body: <p>We are using <code>org.apache.pdfbox:pdfbox:2.0.0</code> for generating dynamic content in pdf. As a part of same, we are populating some of the <code>PDField</code> which are part of <code>PDAcroForm</code>.</p>
  <p>The feature was working fine for a long time. But then we recently we suddenly started to see below error in production. No change or deployment was done.</p>
  <blockquote>
  <p>U+0032 is not available in this font's encoding: WinAnsiEncoding</p>
  </blockquote>
  <p>On the service restart, it got fixed. Since then we are not able to replicate on staging. It didn't happen again in production after that.</p>
  <p>However, we are concerned if it suddenly breaks in production again as it is a critical flow.</p>
  <p>Any leads for debugging will be appreciated.</p>
  <p>PS: We are already setting default font and default appearance:</p>
  <pre><code>acroForm.setDefaultAppearance(acroForm.getDefaultAppearance());
  </code></pre>
  <pre><code>private void addFont(PDAcroForm acroForm) {
      PDResources resources = acroForm.getDefaultResources();
      if (resources == null) {
        resources = new PDResources();
      }
  
      resources.put(COSName.getPDFName(&quot;Helvetica&quot;), PDType1Font.HELVETICA);
      if (acroForm.getDefaultResources() == null) {
        acroForm.setDefaultResources(resources);
      }
    }
  </code></pre>
  <p>Our is spring boot application running over k8.</p>