I'm using org.apache.pdfbox.rendering.PDFRenderer renderPageToGraphics
method in a GUI component.
This PDFRenderer requires a document in the constructor.  This render
method requires the document to be open.  PDDocument.load creates and opens
the document object.  How much overhead is in this method?
I either need to call the load method every time I call the render method,
or I need to make sure it loads once and call the close method when the
component gets destroyed?
If I don't call the close method I get this message in my logs.
org.apache.pdfbox.cos.COSDocument finalize
WARNING: Warning: You did not close a PDF Document

Reply via email to