- did you close the document when done?
- when using a profiler, does the memory usage (i,.e. the object count) go up with each PDF?

I ask because PDFBox does keep some font stuff statically.

Tilman


Am 12.05.2014 09:57, schrieb Maruan Sahyoun:
Hi Mack,

how do you add the data to the PDF. Could you share some sample code with us? 
Which version od PDFBox are you using? On which platform?

BR
Maruan Sahyoun

Am 07.05.2014 um 21:13 schrieb Mack Giddens <[email protected]>:

I'm not sure if I'm mailing this right but I have a bad memory leak.  I was
using PDF box to put data in a PDF and save it.  I keep getting that
class org.apache.pdfbox.pdmodel.font.PDFont @ 0x7ffeef08fb8 - 13,413,168
(4.99%) bytes.
is the problem I have tried the whole list of the clear resources but that
doesn't seem to free anything.  I have the pdfont taking 13 meg 15 times in
my memory dump.  Even when all the sessions time out this is still holding
the memory.  I was just wondering if this is something you have seen before
and maybe I'm doing something wrong you could tell me how to fix or release
the memory. I have watched it when the pdf is saved, closed, changed and it
never seems to let go.  I have went back in everything I have made to close
and set to null hoping that would help.  I hate to bug you but I've been
working on figuring this out for a while.  I put this in too but it didn't
do anything.

org.apache.pdfbox.pdmodel.font.PDCIDFontType2Font.clearResources();

org.apache.pdfbox.pdmodel.font.PDFont.clearResources();

org.apache.pdfbox.cos.COSName.clearResources();

org.apache.pdfbox.pdmodel.font.PDCIDFont.clearResources();

org.apache.pdfbox.pdmodel.font.PDCIDFontType0Font.clearResources();

org.apache.pdfbox.pdmodel.font.PDCIDFontType2Font.clearResources();

org.apache.pdfbox.pdmodel.font.PDFont.clearResources();

org.apache.pdfbox.pdmodel.font.PDMMType1Font.clearResources();

org.apache.pdfbox.pdmodel.font.PDSimpleFont.clearResources();

org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.clearResources();

org.apache.pdfbox.pdmodel.font.PDType0Font.clearResources();

org.apache.pdfbox.pdmodel.font.PDType1AfmPfbFont.clearResources();

org.apache.pdfbox.pdmodel.font.PDType1CFont.clearResources();

org.apache.pdfbox.pdmodel.font.PDType1Font.clearResources();

org.apache.pdfbox.pdmodel.font.PDType3Font.clearResources();
Thanks,
Mack D. Giddens


Reply via email to