You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "rumburak (JIRA)" <ji...@apache.org> on 2018/05/29 16:45:00 UTC

[jira] [Closed] (PDFBOX-3585) National characters not correctly displayed in text form field

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

rumburak closed PDFBOX-3585.
----------------------------
       Resolution: Not A Problem
    Fix Version/s: 2.0.10

This is not a problem in 2.0.10 anymore. I don't know why

> National characters not correctly displayed in text form field
> --------------------------------------------------------------
>
>                 Key: PDFBOX-3585
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3585
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 2.0.3
>            Reporter: rumburak
>            Priority: Major
>             Fix For: 2.0.10
>
>         Attachments: acrobat_error.png, fontissue.zip, sampleform.pdf, sampleform_filled.pdf, sampleform_filled_workaround.pdf, sampleform_filled_workaround_flatten.pdf
>
>
> I tried to follow workaround suggested in PDFBOX-3138 to be able to display czech national characters in PDF form field. I created sample form in OpenOffice 4.1.3 (file sampleform.pdf) and I created code that adds Type 0 font to existing PDF font and then it replaces current font used in form field. 
> I've got 3 problems:
> 1. After using PDFont font = PDType0Font.load(doc, new File("fonts/TIMESS__.ttf"));
> the font is not loaded into PDF document resources. It is loaded there once it is used in content stream. OK, I created new dummy page and created dummy text. Finally I can remove the dummy page and the font is still loaded in PDF document resources.
> 2. Czech characters are not displayed, you can see just strange square chars. I investigated once I use the czech chars somewhere in content stream in my dummy text then all is displayed correctly (file sampleform_filled.pdf).
> Ok, I did the workaround and I have now  file sampleform_filled_workaround.pdf
> 3. Now when in Acrobat Reader I click in field with correctly displayed text I can see error "Cannot extract the embedded font 'AAAPNQ+TimesSansSerif'. Some characters may not display or print correctly." This can be workarounded if I flatten the form using acroForm.flatten(); ( file sampleform_filled_workaround_flatten.pdf)
> I'm not sure about root causes for all 3 issues but the behaviour is strange so these issues should be investigated. Attaching java project and PDFs



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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