pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (Jira)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-4678) Use PDFontFactory. CreateDefaultFont font to render text, the exported PDF document has a mistake
Date Tue, 05 Nov 2019 17:49:00 GMT

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

ASF subversion and git services commented on PDFBOX-4678:
---------------------------------------------------------

Commit 1869423 from Tilman Hausherr in branch 'pdfbox/branches/issue45'
[ https://svn.apache.org/r1869423 ]

PDFBOX-4678: deprecate method that returns a possibly broken font, use / return standard font
instead

> 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
>            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


Mime
View raw message