[ 
https://issues.apache.org/jira/browse/PDFBOX-3388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15347909#comment-15347909
 ] 

Tilman Hausherr commented on PDFBOX-3388:
-----------------------------------------

{quote}
So If i get a debug warning that the buffer is not closed then it should
mean that the scratchFileBUffer class object is no longer referenced as
this tatement is in finalize class. right?
{quote}
Yes.

{quote}
I have some questions about pdf rendering, should i open another issue or
would you help me here?
{quote}
If it is a how-to question, ask on the mailing list or on stackoverflow. If it 
is a bug, please open a new issue.

> PDFTextStripper - ScratchFileBuffer not closed!
> -----------------------------------------------
>
>                 Key: PDFBOX-3388
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3388
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Roman Pichlik
>         Attachments: CloseablePDFParser.java, PDFStripperTest.java, test.pdf
>
>
> _PDFTextStripper_ or inherently used classes probably do not close all opened 
> streams under all circumstances. You can reproduce that by the following 
> snippet of code and the attached PDF file.
> {code}
> try (RandomAccessBuffer rab = new RandomAccessBuffer(is)) {
>             PDFParser parser = new PDFParser(rab);
>             parser.parse();
>             try (COSDocument cosDoc = parser.getDocument();PDDocument pdDoc = 
> new PDDocument(cosDoc);){
>                 PDFTextStripper pdfStripper = new PDFTextStripper();
>                 pdfStripper.getText(pdDoc);
>             }
>         } catch (IOException e) {
>             throw new RuntimeException(e);
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to