I am loading a PDF file into a PDDocument , using its PDAcroForm.importFDF to
import FDF field data, and then using PDAcroForm.flatten.
When refreshAppearances is false PDAcroForm.flatten works, but when
refreshAppearances is true, I get the exception below. This happens on linux
(where I've added all the MS font RPMS) and windows where all the MS fonts
should be.
Thank you in advance,
Dave
...
Could not find font: /TimesNewRoman
java.io.IOException: Could not find font: /TimesNewRoman
at
org.apache.pdfbox.pdmodel.interactive.form.PDDefaultAppearanceString.processSetFont(PDDefaultAppearanceString.java:180)
at
org.apache.pdfbox.pdmodel.interactive.form.PDDefaultAppearanceString.processOperator(PDDefaultAppearanceString.java:132)
at
org.apache.pdfbox.pdmodel.interactive.form.PDDefaultAppearanceString.processAppearanceStringOperators(PDDefaultAppearanceString.java:108)
at
org.apache.pdfbox.pdmodel.interactive.form.PDDefaultAppearanceString.<init>(PDDefaultAppearanceString.java:86)
at
org.apache.pdfbox.pdmodel.interactive.form.PDVariableText.getDefaultAppearanceString(PDVariableText.java:93)
at
org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.<init>(AppearanceGeneratorHelper.java:100)
at
org.apache.pdfbox.pdmodel.interactive.form.PDTextField.constructAppearances(PDTextField.java:262)
at
org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.refreshAppearances(PDAcroForm.java:390)
at
org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.flatten(PDAcroForm.java:265)
This email, including attachments, may contain information that is privileged,
confidential or is exempt from disclosure under applicable law (including, but
not limited to, protected health information). It is not intended for
transmission to, or receipt by, any unauthorized persons. If the reader of this
message is not the intended recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are hereby notified that
any dissemination, distribution or copying of this communication is strictly
prohibited. If you believe this email was sent to you in error, do not read it.
Please notify the sender immediately informing them of the error and delete all
copies and attachments of the message from your system. Thank you.