You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2014/10/13 20:17:34 UTC

[jira] [Closed] (PDFBOX-968) Writing text into existing PDF - extra spaces between characters on some pages of the PDF

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

Andreas Lehmkühler closed PDFBOX-968.
-------------------------------------
    Resolution: Not a Problem
      Assignee: Andreas Lehmkühler

This is more a question than an issue.

It's always a good idea to neutralize the graphics state before adding new content, so that the current state can't influence the adding operation. See AddMessageToEachPage within the examples on ow to do that

> Writing text into existing PDF - extra spaces between characters on some pages of the PDF
> -----------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-968
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-968
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Writing
>    Affects Versions: 1.3.1
>         Environment: Windows and Solaris environment
>            Reporter: C. Bertho
>            Assignee: Andreas Lehmkühler
>         Attachments: ASF.LICENSE.NOT.GRANTED--TextStamping_LetterSpacing1.jpg, ASF.LICENSE.NOT.GRANTED--TextStamping_LetterSpacing2.jpg
>
>
> I used PDFBox to add text into existing PDF documents (kind of text stamping).
> For some pages of PDF, the space/gap between letters/characters of the text is much wider !
> I cannot explain how/why it happens ?!
> Sample of my code:
> contentStream.beginText();
> contentStream.setNonStrokingColor(colorText);
> contentStream.setFont(pdfFont, fontSize);
> contentStream.moveTextPositionByAmount(xText, yText);
> contentStream.drawString(messageStamp);
> contentStream.endText();



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