title: How to fill PDF form with specific font using pdfbox?
body: <p>I am trying to fill pdf form and I am able to fill it using the following approach through PDFBox library.</p>
  
  <pre><code>val pdf: PDDocument = PDDocument.load(file)
  pdf.setAllSecurityToBeRemoved(true)
  val docCatalog: PDDocumentCatalog = pdf.getDocumentCatalog
  val acroForm: PDAcroForm = docCatalog.getAcroForm
  
  def populateFields(inputJson: String, targetPdfPath: String): Unit = {
      val valueMap: Array[Field] = gson.fromJson(inputJson, classOf[Array[Field]])
      valueMap.foreach((field) =&gt; {
        val pdField: PDField = acroForm.getField(field.name)
  
        if (pdField != null) {
          pdField.setValue(field.value)
        } else {
          println(s"No field with name ${field.name}")
        }
      })
  
      pdf.save(targetPdfPath)
      pdf.close()
    }
  </code></pre>
  
  <p>The only problem is, I don't see any option to set the font before filling the pdf. Can you help me here?</p>