You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2016/09/12 17:26:20 UTC

[jira] [Comment Edited] (PDFBOX-3332) Apache PDFBox Form Fill TrueType text spacing issue

    [ https://issues.apache.org/jira/browse/PDFBOX-3332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15484696#comment-15484696 ] 

Tilman Hausherr edited comment on PDFBOX-3332 at 9/12/16 5:25 PM:
------------------------------------------------------------------

{code}
Caused by: java.lang.NullPointerException: null
    org.apache.pdfbox.pdmodel.font.encoding.Encoding.overwrite(Encoding.java:118)
    org.apache.pdfbox.pdmodel.font.encoding.DictionaryEncoding.applyDifferences(DictionaryEncoding.java:151)
    org.apache.pdfbox.pdmodel.font.encoding.DictionaryEncoding.<init>(DictionaryEncoding.java:128)
    org.apache.pdfbox.pdmodel.font.PDSimpleFont.readEncoding(PDSimpleFont.java:129)
    org.apache.pdfbox.pdmodel.font.PDType1CFont.<init>(PDType1CFont.java:131)
    org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:60)
{code}
with PDFBOX-1772, PDFBOX-1824, PDFBOX-2055, PDFBOX-2103, PDFBOX-2552, PDFBOX-2917


was (Author: tilman):
{code}
Caused by: java.lang.NullPointerException: null
    org.apache.pdfbox.pdmodel.font.encoding.Encoding.overwrite(Encoding.java:118)
    org.apache.pdfbox.pdmodel.font.encoding.DictionaryEncoding.applyDifferences(DictionaryEncoding.java:151)
    org.apache.pdfbox.pdmodel.font.encoding.DictionaryEncoding.<init>(DictionaryEncoding.java:128)
    org.apache.pdfbox.pdmodel.font.PDSimpleFont.readEncoding(PDSimpleFont.java:129)
    org.apache.pdfbox.pdmodel.font.PDType1CFont.<init>(PDType1CFont.java:131)
    org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:60)
{code}
with PDFBOX-1772, PDFBOX-2055, PDFBOX-2103, PDFBOX-2552, PDFBOX-2917

> Apache PDFBox Form Fill TrueType text spacing issue
> ---------------------------------------------------
>
>                 Key: PDFBOX-3332
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3332
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 2.0.1
>         Environment: Mac OS X/JDK 1.8.0_65
>            Reporter: Richard Brown
>            Assignee: Andreas Lehmkühler
>            Priority: Critical
>             Fix For: 2.0.3, 2.1.0
>
>         Attachments: BLANK.pdf, FillFormField-acrobat.pdf, FillFormField.pdf, FillFormField_SNAPSHOT_2.0.2.pdf, FillFormField_iText.pdf, Main.java, formfill_SNAPSHOT_2.0.2.png, formfill_not_rotated_2.0.2.png
>
>
> I'm using Apache PDFBox to fill a PDF Form. I'm using a TrueType font (not a default font) called 'Impact', pretty standard fare. In the template I have a field called "Title" that has the Impact font assigned. I use the code below to take that template and populate the field with a value that has several words in it.
> The issue is when you view the created PDF there are large spaces between the words. If you open the PDF in Acrobat and click on the field the text alters and the large spacing goes away. Editing the field in any way will permanently correct the issue, but I'm generating the forms to NOT be altered after the fact.
> I've tried the same experiment with the default fonts (Helvetica in this case) and the above issue doesn't exist. I can create a blank form and add a field and set the custom font and duplicate the issue.
> I've read that a similar issue was addressed in 2.0.0, PDFBOX-2062 but it was for changing font size, not a custom font.



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

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