[ 
https://issues.apache.org/jira/browse/PDFBOX-1550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Hewson updated PDFBOX-1550:
--------------------------------
    Description: 
I have a PDF form using AcroForm that generates a "Don't know how to calculate 
the position for non-simple fonts" exception when calling setValue on a textbox 
field. After running it in a debugger, it appears the problem is that the font 
inside the AcroForm resources is named "Helv" but PDFBox gets "Helvetica" as 
the cosFontName on line 434 of PDAppearance.java. So then when it tries to get 
the font from the formResources on line 439 (formResources.getFonts().get( 
fontName );), it returns null because there is no "Helvetica" font, only 
"Helv". I changed the fontName variable's value to "Helv" in the debugger and 
that allowed setValue to complete without error.

Is this a problem with the form? I didn't see any way to fix it in Acrobat 
Pro's UI.

  was:
I have a PDF form (a Colorado absentee ballot application form; 
https://dl.dropbox.com/u/26964/co_absentee.en.pdf) using AcroForm that 
generates a "Don't know how to calculate the position for non-simple fonts" 
exception when calling setValue on a textbox field. After running it in a 
debugger, it appears the problem is that the font inside the AcroForm resources 
is named "Helv" but PDFBox gets "Helvetica" as the cosFontName on line 434 of 
PDAppearance.java. So then when it tries to get the font from the formResources 
on line 439 (formResources.getFonts().get( fontName );), it returns null 
because there is no "Helvetica" font, only "Helv". I changed the fontName 
variable's value to "Helv" in the debugger and that allowed setValue to 
complete without error.

Is this a problem with the form? I didn't see any way to fix it in Acrobat 
Pro's UI.


> Helv vs. Helvetica font names cause PDField.setValue to fail
> ------------------------------------------------------------
>
>                 Key: PDFBOX-1550
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1550
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 1.8.0
>         Environment: Mac OS X 10.8.3
> Oracle Java 1.7.0_15-b03
> PDFBox 1.8.0
> Error happens with this form: 
> https://dl.dropbox.com/u/26964/co_absentee.en.pdf
>            Reporter: Wes Morgan
>             Fix For: 2.0.0
>
>         Attachments: co_absentee.en.pdf
>
>
> I have a PDF form using AcroForm that generates a "Don't know how to 
> calculate the position for non-simple fonts" exception when calling setValue 
> on a textbox field. After running it in a debugger, it appears the problem is 
> that the font inside the AcroForm resources is named "Helv" but PDFBox gets 
> "Helvetica" as the cosFontName on line 434 of PDAppearance.java. So then when 
> it tries to get the font from the formResources on line 439 
> (formResources.getFonts().get( fontName );), it returns null because there is 
> no "Helvetica" font, only "Helv". I changed the fontName variable's value to 
> "Helv" in the debugger and that allowed setValue to complete without error.
> Is this a problem with the form? I didn't see any way to fix it in Acrobat 
> Pro's UI.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to