You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2018/12/06 08:58:00 UTC

[jira] [Closed] (PDFBOX-3388) PDFTextStripper - ScratchFileBuffer not closed!

     [ https://issues.apache.org/jira/browse/PDFBOX-3388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr closed PDFBOX-3388.
-----------------------------------
    Resolution: Duplicate

Closing as duplicate of PDFBOX-3359. I've added you as a watcher there.

> PDFTextStripper - ScratchFileBuffer not closed!
> -----------------------------------------------
>
>                 Key: PDFBOX-3388
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3388
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Roman Pichlik
>            Priority: Major
>         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
(v7.6.3#76005)

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