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 2019/12/23 22:16:01 UTC

[jira] [Closed] (PDFBOX-4678) Use PDFontFactory. CreateDefaultFont font to render text, the exported PDF document has a mistake

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

Andreas Lehmkühler closed PDFBOX-4678.
--------------------------------------

> Use PDFontFactory. CreateDefaultFont font to render text, the exported PDF document has a mistake
> -------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-4678
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4678
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.17
>            Reporter: bai yuan
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 2.0.18, 3.0.0 PDFBox
>
>         Attachments: AdobeError.png, GoogleChrome.png, Test.zip
>
>
> Using PDFontFactory. CreateDefaultFont font to render a text and save this document.
> {code:java}
> float fontSize = 11;
> PDFont font = PDFontFactory.createDefaultFont(); 
> contentStream.beginText();  
> contentStream.newLineAtOffset(100, 100); 
> contentStream.setFont(font, fontSize);
> contentStream.showText("¥456,123"); 
> contentStream.endText();
> contentStream.close();
> doc.save("sample.pdf");{code}
> Open the PDF document with Abode and throw the following error message when editing the document.
> !AdobeError.png!
> And i opened this pdf document using the Google browser as shown below:
> !GoogleChrome.png!
> [^Test.zip]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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