This was done in the 1.8 version but no longer in the 2.0 version, because awt would often choke (including jvm crashes) on fonts that were not fully perfect. This got us too many support questions that contained the sentence "but it displays with Adobe Reader". The 2.0 version does its own font rendering.

To convert to awt fonts, extract the font stream (there are differences depending on the font type) and feed that stream to Font.createFont(). See the 1.8 source code.

Tilman

Am 28.02.2019 um 08:24 schrieb PDF Project 1:
Hello,
We are creating a PDF viewer which is an open source project. As the pdf
engine, we use Pdfbox and now we faced a problem in converting PDFont to
java.awt.font. We use JTextPanes to display the text lines of pdf pages, so
we need to get an awt font equivalent to PDFont. We found a similar
question in StackOverflow.com but that question is unanswered. We googled
but there is no support on google to the problem. Please help.


Thank you,
LightView development team.
https://github.com/PdfProject8/LightViewer
The LightView opensource java PDF reader project



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to