Could you upload a sample form to a public location to look at the internals? 
Very likely the font reference used in one of the form fields doesn't match the 
available font resources.

BR
Maruan


> Am 25.01.2018 um 16:22 schrieb David Fertig <[email protected]>:
> 
> I've been working with the latest release, 2.0.8.  But I also downloaded and 
> tried the latest 
> 3.0.0-SNAPSHOT(pdfbox-bff7df7a9034a2522c041c09befff709bb0c31d2.zip) and had 
> the same issue.
> Thank you,
> Dave
> 
> -----Original Message-----
> From: Tilman Hausherr [mailto:[email protected]]
> Sent: Thursday, January 25, 2018 2:11 AM
> To: [email protected]
> Subject: Re: "Could not find font: /TimesNewRoman" when flattening form with 
> refreshAppearances set to true.
> 
> Hi,
> What version are you using?
> Tilman
> 
> Am 25.01.2018 um 08:03 schrieb David Fertig:
>> 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.
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 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.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to