[
https://issues.apache.org/jira/browse/PDFBOX-2848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr closed PDFBOX-2848.
-----------------------------------
Resolution: Duplicate
> Could not find font: /Courier for PDTextField
> ---------------------------------------------
>
> Key: PDFBOX-2848
> URL: https://issues.apache.org/jira/browse/PDFBOX-2848
> Project: PDFBox
> Issue Type: Bug
> Components: AcroForm
> Affects Versions: 2.0.0
> Reporter: Tilman Hausherr
> Attachments: TestTemplate.pdf
>
>
> This code
> {code}
> PDField newField =
> tplDoc.getDocumentCatalog().getAcroForm().getField("01.011.Name");
> PDTextField newTextField = (PDTextField) newField;
> newTextField.setValue("huhu");
> {code}
> brings this exception:
> {code}
> Exception in thread "main" java.io.IOException: Could not find font: /Courier
> at
> org.apache.pdfbox.pdmodel.interactive.form.PDAppearanceString.getFont(PDAppearanceString.java:128)
> at
> org.apache.pdfbox.pdmodel.interactive.form.PDAppearanceString.copyNeededResourcesTo(PDAppearanceString.java:175)
> at
> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.setAppearanceContent(AppearanceGeneratorHelper.java:130)
> at
> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.setAppearanceValue(AppearanceGeneratorHelper.java:106)
> at
> org.apache.pdfbox.pdmodel.interactive.form.PDTextField.constructAppearances(PDTextField.java:262)
> at
> org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField.applyChange(PDTerminalField.java:220)
> at
> org.apache.pdfbox.pdmodel.interactive.form.PDTextField.setValue(PDTextField.java:217)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]