pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: What causes "Building on-disk font cache"
Date Wed, 18 Jan 2017 16:54:37 GMT
Am 18.01.2017 um 17:16 schrieb Clark, Raymond C:
> Thank you.  What I don't understand is this:
> I have the 1 PDF format.  I repeatedly write it out with different sets of data.  It
was working fine, then I got this exception and from then on it failed to create the PDFs.
 Why was it able to create PDFs for a while and then decided it needed to write the cache
to disk?
> I'm wondering if I'm not closing something or cleaning something up that is causing this.
 As I said, it worked fine for the first hundred or so and then started failing.

Can you reproduce the effect without using Tomcat? And post that code 
here? The "Building on-disk font cache, this may take a while" message 
should come only once, when PDFBox needs to search what fonts are 
available on the system. Here it does this when creating the ZAPF 
Dingbats type 1 font. (If the number is correct)

What happens at

PDFGenerator.java:920 ?

About your stack trace:

PDType1Font.java:76 - that is the initialization of PDType1Font.ZAPF_DINGBATS

PDType1Font.java:115 - can't find. Did you mention what version you're using?

"Finished building on-disk font cache, found 0 fonts" - do you have 0 
fonts on your system?


> Any ideas?
> Thank you,
> Ray
> -----Original Message-----
> From: Tilman Hausherr [mailto:THausherr@t-online.de]
> Sent: Wednesday, January 18, 2017 10:10 AM
> To: users@pdfbox.apache.org
> Subject: Re: What causes "Building on-disk font cache"
> Am 18.01.2017 um 03:47 schrieb Clark, Raymond C:
>> java.io.FileNotFoundException:/opt/tomcat/.pdfbox.cache (Permission denied)
> Normally this should be written in the user directory... you can set
> this by setting the property   pdfbox.fontcache
> Here's a code excerpt:
>       private File getDiskCacheFile()
>       {
>           String path = System.getProperty("pdfbox.fontcache");
>           if (path == null)
>           {
>               path = System.getProperty("user.home");
>               if (path == null)
>               {
>                   path = System.getProperty("java.io.tmpdir");
>               }
>           }
>           return new File(path, ".pdfbox.cache");
>       }
> ________________________________
> CONFIDENTIALITY NOTICE: This e-mail and any files transmitted with it are intended solely
for the use of the individual or entity to whom they are addressed and may contain confidential
and privileged information protected by law. If you received this e-mail in error, any review,
use, dissemination, distribution, or copying of the e-mail is strictly prohibited. Please
notify the sender immediately by return e-mail and delete all copies from your system.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org

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

View raw message