[
https://issues.apache.org/jira/browse/PDFBOX-3334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15266200#comment-15266200
]
Tilman Hausherr commented on PDFBOX-3334:
-----------------------------------------
I tried the same now, opened and rendered the file 10x but only one ttf
remains. That one is the Helvetica font from page 2, which is a standard 14
font. (See line 76 of PDType1Font.java, these are static and the actual font
loaded depends on the system).
I have a theory... see this code in TrueTypeCollection.java
{code}
public TrueTypeFont getFontByName(String name) throws IOException
{
for (int i = 0; i < numFonts; i++)
{
TrueTypeFont font = getFontAtIndex(i);
if (font.getName().equals(name))
{
return font;
}
}
return null;
}
{code}
the TT font is not closed if it doesn't match.
Could you look at your .pdfbox.cache file in your user directory, to see
whether Helvetica or Arial is a part of a .ttc file?
> TrueType fonts memory leak
> --------------------------
>
> Key: PDFBOX-3334
> URL: https://issues.apache.org/jira/browse/PDFBOX-3334
> Project: PDFBox
> Issue Type: Bug
> Components: FontBox
> Affects Versions: 2.0.1
> Reporter: Juraj Lonc
> Attachments: screenshot-1.png,
> skusenosti-z-implementacie-a-prevadzky-systemu_roman-pavco.pdf
>
>
> I open this PDF document, read all pages and render to images, close document.
> After running GC there are still TrueTypeFont objects in memory.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]