pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Fertig <David.Fer...@navihealth.com>
Subject RE: "Could not find font: /TimesNewRoman" when flattening form with refreshAppearances set to true.
Date Mon, 29 Jan 2018 18:45:18 GMT
Thank you for replying.  I was not able to get permission to upload the original form, but
I was able to change the offending font from TimesNewRoman to Arial, which all the other fields
were.

I can upload the dictionary associated with the default resources for this field before the
change, but don't want anyone to waste time on it..  It looks like a TimesNewRoman -vs Times-Roman
issue.
Thank you,
Dave


COSDictionary{COSName{Encoding}:COSDictionary{COSName{PDFDocEncoding}:COSObject{COSDictionary{COSName{Differences}:COSArray{[COSInt{24},
COSName{breve}, COSName{caron}, COSName{circumflex}, COSName{dotaccent}, COSName{hungarumlaut},
COSName{ogonek}, COSName{ring}, COSName{tilde}, COSInt{39}, COSName{quotesingle}, COSInt{96},
COSName{grave}, COSInt{128}, COSName{bullet}, COSName{dagger}, COSName{daggerdbl}, COSName{ellipsis},
COSName{emdash}, COSName{endash}, COSName{florin}, COSName{fraction}, COSName{guilsinglleft},
COSName{guilsinglright}, COSName{minus}, COSName{perthousand}, COSName{quotedblbase}, COSName{quotedblleft},
COSName{quotedblright}, COSName{quoteleft}, COSName{quoteright}, COSName{quotesinglbase},
COSName{trademark}, COSName{fi}, COSName{fl}, COSName{Lslash}, COSName{OE}, COSName{Scaron},
COSName{Ydieresis}, COSName{Zcaron}, COSName{dotlessi}, COSName{lslash}, COSName{oe}, COSName{scaron},
COSName{zcaron}, COSInt{160}, COSName{Euro}, COSInt{164}, COSName{currency}, COSInt{166},
COSName{brokenbar}, COSInt{168}, COSName{dieresis}, COSName{copyright}, COSName{ordfeminine},
COSInt{172}, COSName{logicalnot}, COSName{.notdef}, COSName{registered}, COSName{macron},
COSName{degree}, COSName{plusminus}, COSName{twosuperior}, COSName{threesuperior}, COSName{acute},
COSName{mu}, COSInt{183}, COSName{periodcentered}, COSName{cedilla}, COSName{onesuperior},
COSName{ordmasculine}, COSInt{188}, COSName{onequarter}, COSName{onehalf}, COSName{threequarters},
COSInt{192}, COSName{Agrave}, COSName{Aacute}, COSName{Acircumflex}, COSName{Atilde}, COSName{Adieresis},
COSName{Aring}, COSName{AE}, COSName{Ccedilla}, COSName{Egrave}, COSName{Eacute}, COSName{Ecircumflex},
COSName{Edieresis}, COSName{Igrave}, COSName{Iacute}, COSName{Icircumflex}, COSName{Idieresis},
COSName{Eth}, COSName{Ntilde}, COSName{Ograve}, COSName{Oacute}, COSName{Ocircumflex}, COSName{Otilde},
COSName{Odieresis}, COSName{multiply}, COSName{Oslash}, COSName{Ugrave}, COSName{Uacute},
COSName{Ucircumflex}, COSName{Udieresis}, COSName{Yacute}, COSName{Thorn}, COSName{germandbls},
COSName{agrave}, COSName{aacute}, COSName{acircumflex}, COSName{atilde}, COSName{adieresis},
COSName{aring}, COSName{ae}, COSName{ccedilla}, COSName{egrave}, COSName{eacute}, COSName{ecircumflex},
COSName{edieresis}, COSName{igrave}, COSName{iacute}, COSName{icircumflex}, COSName{idieresis},
COSName{eth}, COSName{ntilde}, COSName{ograve}, COSName{oacute}, COSName{ocircumflex}, COSName{otilde},
COSName{odieresis}, COSName{divide}, COSName{oslash}, COSName{ugrave}, COSName{uacute}, COSName{ucircumflex},
COSName{udieresis}, COSName{yacute}, COSName{thorn}, COSName{ydieresis}]};COSName{Type}:COSName{Encoding};}};};COSName{Font}:COSDictionary{COSName{Arial}:COSObject{COSDictionary{COSName{BaseFont}:COSName{Arial};COSName{Encoding}:COSName{WinAnsiEncoding};COSName{FirstChar}:COSInt{0};COSName{FontDescriptor}:COSObject{COSDictionary{COSName{Ascent}:COSInt{1006};COSName{CapHeight}:COSInt{716};COSName{Descent}:COSInt{-325};COSName{Flags}:COSInt{32};COSName{FontBBox}:COSArray{[COSInt{-665},
COSInt{-325}, COSInt{2000}, COSInt{1006}]};COSName{FontFamily}:COSString{Arial};COSName{FontFile2}:COSObject{COSDictionary{COSName{Length}:COSInt{449911};COSName{Filter}:COSName{FlateDecode};COSName{Length1}:COSInt{772171};}COSStream{-701901802}};COSName{FontName}:63529059;COSName{FontStretch}:COSName{Normal};COSName{FontWeight}:COSInt{400};COSName{ItalicAngle}:0;COSName{StemV}:COSInt{88};COSName{Type}:COSName{FontDescriptor};COSName{XHeight}:COSInt{519};}};COSName{LastChar}:COSInt{255};COSName{Name}:63529059;COSName{Subtype}:COSName{TrueType};COSName{Type}:COSName{Font};COSName{Widths}:COSArray{[COSInt{750},
COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750},
COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750},
COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750},
COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750}, COSInt{750},
COSInt{750}, COSInt{750}, COSInt{750}, COSInt{278}, COSInt{278}, COSInt{355}, COSInt{556},
COSInt{556}, COSInt{889}, COSInt{667}, COSInt{191}, COSInt{333}, COSInt{333}, COSInt{389},
COSInt{584}, COSInt{278}, COSInt{333}, COSInt{278}, COSInt{278}, COSInt{556}, COSInt{556},
COSInt{556}, COSInt{556}, COSInt{556}, COSInt{556}, COSInt{556}, COSInt{556}, COSInt{556},
COSInt{556}, COSInt{278}, COSInt{278}, COSInt{584}, COSInt{584}, COSInt{584}, COSInt{556},
COSInt{1015}, COSInt{667}, COSInt{667}, COSInt{722}, COSInt{722}, COSInt{667}, COSInt{611},
COSInt{778}, COSInt{722}, COSInt{278}, COSInt{500}, COSInt{667}, COSInt{556}, COSInt{833},
COSInt{722}, COSInt{778}, COSInt{667}, COSInt{778}, COSInt{722}, COSInt{667}, COSInt{611},
COSInt{722}, COSInt{667}, COSInt{944}, COSInt{667}, COSInt{667}, COSInt{611}, COSInt{278},
COSInt{278}, COSInt{278}, COSInt{469}, COSInt{556}, COSInt{333}, COSInt{556}, COSInt{556},
COSInt{500}, COSInt{556}, COSInt{556}, COSInt{278}, COSInt{556}, COSInt{556}, COSInt{222},
COSInt{222}, COSInt{500}, COSInt{222}, COSInt{833}, COSInt{556}, COSInt{556}, COSInt{556},
COSInt{556}, COSInt{333}, COSInt{500}, COSInt{278}, COSInt{556}, COSInt{500}, COSInt{722},
COSInt{500}, COSInt{500}, COSInt{500}, COSInt{334}, COSInt{260}, COSInt{334}, COSInt{584},
COSInt{350}, COSInt{556}, COSInt{350}, COSInt{222}, COSInt{556}, COSInt{333}, COSInt{1000},
COSInt{556}, COSInt{556}, COSInt{333}, COSInt{1000}, COSInt{667}, COSInt{333}, COSInt{1000},
COSInt{350}, COSInt{611}, COSInt{350}, COSInt{350}, COSInt{222}, COSInt{222}, COSInt{333},
COSInt{333}, COSInt{350}, COSInt{556}, COSInt{1000}, COSInt{333}, COSInt{1000}, COSInt{500},
COSInt{333}, COSInt{944}, COSInt{350}, COSInt{500}, COSInt{667}, COSInt{278}, COSInt{333},
COSInt{556}, COSInt{556}, COSInt{556}, COSInt{556}, COSInt{260}, COSInt{556}, COSInt{333},
COSInt{737}, COSInt{370}, COSInt{556}, COSInt{584}, COSInt{333}, COSInt{737}, COSInt{552},
COSInt{400}, COSInt{549}, COSInt{333}, COSInt{333}, COSInt{333}, COSInt{576}, COSInt{537},
COSInt{333}, COSInt{333}, COSInt{333}, COSInt{365}, COSInt{556}, COSInt{834}, COSInt{834},
COSInt{834}, COSInt{611}, COSInt{667}, COSInt{667}, COSInt{667}, COSInt{667}, COSInt{667},
COSInt{667}, COSInt{1000}, COSInt{722}, COSInt{667}, COSInt{667}, COSInt{667}, COSInt{667},
COSInt{278}, COSInt{278}, COSInt{278}, COSInt{278}, COSInt{722}, COSInt{722}, COSInt{778},
COSInt{778}, COSInt{778}, COSInt{778}, COSInt{778}, COSInt{584}, COSInt{778}, COSInt{722},
COSInt{722}, COSInt{722}, COSInt{722}, COSInt{667}, COSInt{667}, COSInt{611}, COSInt{556},
COSInt{556}, COSInt{556}, COSInt{556}, COSInt{556}, COSInt{556}, COSInt{889}, COSInt{500},
COSInt{556}, COSInt{556}, COSInt{556}, COSInt{556}, COSInt{278}, COSInt{278}, COSInt{278},
COSInt{278}, COSInt{556}, COSInt{556}, COSInt{556}, COSInt{556}, COSInt{556}, COSInt{556},
COSInt{556}, COSInt{549}, COSInt{611}, COSInt{556}, COSInt{556}, COSInt{556}, COSInt{556},
COSInt{500}, COSInt{556}, COSInt{500}]};}};COSName{HeBo}:COSObject{COSDictionary{COSName{BaseFont}:COSName{Helvetica-Bold};COSName{Encoding}:316217735;COSName{Name}:COSName{HeBo};COSName{Subtype}:COSName{Type1};COSName{Type}:2195567;}};COSName{Helv}:COSDictionary{COSName{Type}:2195567;COSName{Subtype}:81291287;COSName{BaseFont}:COSName{Helvetica};COSName{Encoding}:-1893838958;};COSName{TiRo}:COSObject{COSDictionary{COSName{BaseFont}:COSName{Times-Roman};COSName{Encoding}:316217735;COSName{Name}:COSName{TiRo};COSName{Subtype}:81291287;COSName{Type}:2195567;}};COSName{ZaDb}:COSDictionary{COSName{Type}:2195567;COSName{Subtype}:81291287;COSName{BaseFont}:COSName{ZapfDingbats};};};}
-----Original Message-----
From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
Sent: Thursday, January 25, 2018 11:44 AM
To: users@pdfbox.apache.org
Subject: Re: "Could not find font: /TimesNewRoman" when flattening form with refreshAppearances
set to true.

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 <David.Fertig@navihealth.com>:
>
> 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:THausherr@t-online.de]
> Sent: Thursday, January 25, 2018 2:11 AM
> To: users@pdfbox.apache.org
> 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: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
> 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: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org

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: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message