You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "jorgeeflorez ." <jo...@gmail.com> on 2016/10/03 13:20:00 UTC

Base fonts not found

Hi all,

I am using PDFBox 2.0.0-RC2 on a web application that is deployed on
Wildlfy (Centos 6.8 server). I am trying render a page of a pdf file as an
image but I am getting these warning messages

WARN  org.apache.pdfbox.pdmodel.font.FileSystemFontProvider  - Building
on-disk font cache, this may take a while
WARN  org.apache.pdfbox.pdmodel.font.FileSystemFontProvider  - Finished
building on-disk font cache, found 0 fonts
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Times-Roman
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Times-Bold
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Times-Italic
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Times-BoldItalic
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Helvetica
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Helvetica-Bold
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Helvetica-Oblique
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Helvetica-BoldOblique
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Courier
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Courier-Bold
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Courier-Oblique
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Courier-BoldOblique
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font Symbol
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for base font ZapfDingbats
WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
LiberationSans for Courier

The image generated is pretty different. If I understand correctly, these
fonts are 'always' available (according to
http://pdfbox.apache.org/1.8/cookbook/workingwithfonts.html). I would like
to know if I should do some additional configuration or adjustment to fix
these warning messages.

Thank you.

Best Regards.

Jorge Flórez

Re: Base fonts not found

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 03.10.2016 um 20:57 schrieb jorgeeflorez .:
> Searching a bit. I decided to use:
>
> wget
> http://li.nux.ro/download/nux/dextop/el7/x86_64/webcore-fonts-3.0-1.noarch.rpm
> rpm - webcore-fonts-3.0-1.noarch.rpm
>
> which included most of the fonts and finally copied msgothic.ttc to
> /usr/share/fonts
>
> I have another question... Are these fonts free to copy? or will I need to
> purchase one by one?


https://en.wikipedia.org/wiki/Core_fonts_for_the_Web


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


Re: Base fonts not found

Posted by "jorgeeflorez ." <jo...@gmail.com>.
Thank you all for your help.

From a machine running windows I came up with these filenames for each font:

PDType1Font.TIMES_ROMAN --> C:\Windows\FONTS\times.ttf
PDType1Font.TIMES_BOLD --> C:\Windows\FONTS\timesbd.ttf
PDType1Font.TIMES_ITALIC --> C:\Windows\FONTS\timesi.ttf
PDType1Font.TIMES_BOLD_ITALIC --> C:\Windows\FONTS\timesbi.ttf
PDType1Font.HELVETICA --> C:\Windows\FONTS\arial.ttf
PDType1Font.HELVETICA_BOLD --> C:\Windows\FONTS\arialbd.ttf
PDType1Font.HELVETICA_OBLIQUE --> C:\Windows\FONTS\ariali.ttf
PDType1Font.HELVETICA_BOLD_OBLIQUE --> C:\Windows\FONTS\arialbi.ttf
PDType1Font.COURIER --> C:\Windows\FONTS\cour.ttf
PDType1Font.COURIER_BOLD --> C:\Windows\FONTS\courbd.ttf
PDType1Font.COURIER_OBLIQUE --> C:\Windows\FONTS\couri.ttf
PDType1Font.COURIER_BOLD_OBLIQUE --> C:\Windows\FONTS\courbi.ttf
PDType1Font.SYMBOL --> C:\Windows\FONTS\symbol.ttf
PDType1Font.ZAPF_DINGBAT-->  C:\Windows\FONTS\msgothic.ttc

Searching a bit. I decided to use:

wget
http://li.nux.ro/download/nux/dextop/el7/x86_64/webcore-fonts-3.0-1.noarch.rpm
rpm - webcore-fonts-3.0-1.noarch.rpm

which included most of the fonts and finally copied msgothic.ttc to
/usr/share/fonts

I have another question... Are these fonts free to copy? or will I need to
purchase one by one?

Thank you.

Best Regards.

2016-10-03 12:55 GMT-05:00 John Hewson <jo...@jahewson.com>:

>
> > On 3 Oct 2016, at 06:20, jorgeeflorez . <jo...@gmail.com>
> wrote:
> >
> > Hi all,
> >
> > I am using PDFBox 2.0.0-RC2 on a web application that is deployed on
> > Wildlfy (Centos 6.8 server). I am trying render a page of a pdf file as
> an
> > image but I am getting these warning messages
> >
> > WARN  org.apache.pdfbox.pdmodel.font.FileSystemFontProvider  - Building
> > on-disk font cache, this may take a while
> > WARN  org.apache.pdfbox.pdmodel.font.FileSystemFontProvider  - Finished
> > building on-disk font cache, found 0 fonts
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Times-Roman
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Times-Bold
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Times-Italic
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Times-BoldItalic
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Helvetica
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Helvetica-Bold
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Helvetica-Oblique
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Helvetica-BoldOblique
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Courier
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Courier-Bold
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Courier-Oblique
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Courier-BoldOblique
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font Symbol
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for base font ZapfDingbats
> > WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> > LiberationSans for Courier
> >
> > The image generated is pretty different. If I understand correctly, these
> > fonts are 'always' available (according to
> > http://pdfbox.apache.org/1.8/cookbook/workingwithfonts.html). I would
> like
> > to know if I should do some additional configuration or adjustment to fix
> > these warning messages.
>
> Your system has no fonts installed. Presumably because it’s a server. You
> should install some fonts from your system’s package manager.
>
> > Thank you.
> >
> > Best Regards.
> >
> > Jorge Flórez
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: Base fonts not found

Posted by John Hewson <jo...@jahewson.com>.
> On 3 Oct 2016, at 06:20, jorgeeflorez . <jo...@gmail.com> wrote:
> 
> Hi all,
> 
> I am using PDFBox 2.0.0-RC2 on a web application that is deployed on
> Wildlfy (Centos 6.8 server). I am trying render a page of a pdf file as an
> image but I am getting these warning messages
> 
> WARN  org.apache.pdfbox.pdmodel.font.FileSystemFontProvider  - Building
> on-disk font cache, this may take a while
> WARN  org.apache.pdfbox.pdmodel.font.FileSystemFontProvider  - Finished
> building on-disk font cache, found 0 fonts
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Times-Roman
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Times-Bold
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Times-Italic
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Times-BoldItalic
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Helvetica
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Helvetica-Bold
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Helvetica-Oblique
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Helvetica-BoldOblique
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Courier
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Courier-Bold
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Courier-Oblique
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Courier-BoldOblique
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Symbol
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font ZapfDingbats
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for Courier
> 
> The image generated is pretty different. If I understand correctly, these
> fonts are 'always' available (according to
> http://pdfbox.apache.org/1.8/cookbook/workingwithfonts.html). I would like
> to know if I should do some additional configuration or adjustment to fix
> these warning messages.

Your system has no fonts installed. Presumably because it’s a server. You
should install some fonts from your system’s package manager.

> Thank you.
> 
> Best Regards.
> 
> Jorge Flórez


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


Re: Base fonts not found

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 03.10.2016 um 15:20 schrieb jorgeeflorez .:
> Hi all,
>
> I am using PDFBox 2.0.0-RC2 on a web application that is deployed on

That version is about a year old. We're at 2.0.3 now.

> Wildlfy (Centos 6.8 server). I am trying render a page of a pdf file as an
> image but I am getting these warning messages
>
> WARN  org.apache.pdfbox.pdmodel.font.FileSystemFontProvider  - Building
> on-disk font cache, this may take a while
> WARN  org.apache.pdfbox.pdmodel.font.FileSystemFontProvider  - Finished
> building on-disk font cache, found 0 fonts
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Times-Roman
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback font
> LiberationSans for base font Times-Bold
> WARN  org.apache.pdfbox.pdmodel.font.PDType1Font  - Using fallback fon
>
> The image generated is pretty different. If I understand correctly, these
> fonts are 'always' available (according to
> http://pdfbox.apache.org/1.8/cookbook/workingwithfonts.html). I would like
> to know if I should do some additional configuration or adjustment to fix
> these warning messages.

"always" means that the viewer should always have these. You just need 
to install them.

Tilman

>
> Thank you.
>
> Best Regards.
>
> Jorge Fl�rez
>


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