You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Jens Hohmuth <je...@me.com.INVALID> on 2019/09/16 12:35:42 UTC

warning „Using fallback font LiberationSans“ when using the 14 standard fonts for pdf creation only

Hi,

we‘re using PdfBox 2.x successfully to create PDF documents. We only use the 14 Adobe Standard fonts which are not embedded in the PDF. Everything works well.

However, in the server environment we see a couple of the following warnings:

WARN org.apache.pdfbox.pdmodel.font.PDType1Font Using fallback font LiberationSans for base font Times-Roman
...

While looking around for an explanation I‘ve found the following comment that hints at these warnings to be only relevant for rendering PDF files using PdfBox and can be ignored for PDF creation (our use case):

https://issues.apache.org/jira/browse/PDFBOX-3659?focusedCommentId=15833004&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-15833004

Can someone confirm this?

Would it be possible to change PdfBox in a way to not display these warnings when they are not actually relevant for the use case (PDF creation) or to change something in the way we use PdfBox to prevent this warning?

I was thinking about using a custom FontProvider that reports fonts as not a fallback font, shutting down the warning but I‘m not totally sure about the consequences :)

Thanks!

Jens Hohmuth

Re: warning „Using fallback font LiberationSans“ when using the 14 standard fonts for pdf creation only

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 16.09.2019 um 14:35 schrieb Jens Hohmuth:
> Hi,
>
> we‘re using PdfBox 2.x successfully to create PDF documents. We only use the 14 Adobe Standard fonts which are not embedded in the PDF. Everything works well.
>
> However, in the server environment we see a couple of the following warnings:
>
> WARN org.apache.pdfbox.pdmodel.font.PDType1Font Using fallback font LiberationSans for base font Times-Roman
> ...
>
> While looking around for an explanation I‘ve found the following comment that hints at these warnings to be only relevant for rendering PDF files using PdfBox and can be ignored for PDF creation (our use case):
>
> https://issues.apache.org/jira/browse/PDFBOX-3659?focusedCommentId=15833004&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-15833004
>
> Can someone confirm this?
Yes because I wrote that
>
> Would it be possible to change PdfBox in a way to not display these warnings when they are not actually relevant for the use case (PDF creation) or to change something in the way we use PdfBox to prevent this warning?


No (PDFBox no longer "knows" there that it is generating a PDF) but you 
could change your logging config to exclude that class or to exclude 
warnings. Or (best solution) just install the missing fonts.

Tilman


>
> I was thinking about using a custom FontProvider that reports fonts as not a fallback font, shutting down the warning but I‘m not totally sure about the consequences :)
>
> Thanks!
>
> Jens Hohmuth



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