pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hewson <j...@jahewson.com>
Subject Re: Speedup Font Cache
Date Tue, 20 Oct 2015 14:15:46 GMT
Hi, Pascal,

There’s no way to disable the cache as PDFBox needs to examine each font on the system before
it can perform font substitution. However, the cache should be saved to disk but it if you’re
seeing that message each time you’re running PDFBox then it sounds like either the cache
write has failed or you’re running in an ephemeral environment, such as a Docker container.
Are either of these likely to be true?

Just to provide a little more detail: the cache contains metadata for every font on the system
and is persisted to disk precisely because it’s too slow for PDFBox to examine every system
font every time its initialised. If the cache is not persisted, you pay that full time cost
each time you use PDFBox.

— John

> On 20 Oct 2015, at 06:49, Pascal Burkhardt <pascalburkhardt@mail.de> wrote:
> 
> Hi,
> 
> i upgrade from 1.8.10 to 2.0.0-RC1.
> 
> When i start to create a pdf with pdfbox 2.0.0-RC1 now the log-message appears: "WARNING:
Building font cache, this may take a while". To Create a Font Cache it takes quite a long
time...(2-3sec.). To create a simple pdf-page this is quite long...
> 
> Is there a way to disable the font cache or to speed up this process? Can i load the
font cache on startup of my application, so that when a user requests a pdf it renders quickly
(and do not have to init the cache?) or is there another possibility?
> 
> Thanks,
> Pascal
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message