pdfbox icon indicating copy to clipboard operation
pdfbox copied to clipboard

close PDFStreamParser

Open valerybokov opened this issue 3 months ago • 2 comments

The PDFStreamParser has a close method. Should it be closed outside or the close method should be protected (private)?

valerybokov avatar Oct 13 '25 15:10 valerybokov

The parser is closed in org.apache.pdfbox.pdfparser.PDFStreamParser.parseNextToken() once the end is reached.

I'm not sure if I like that behaviour as it isn't transparent to the user .... maybe we should refactor that first.

lehmi avatar Oct 16 '25 06:10 lehmi

The parser is closed in org.apache.pdfbox.pdfparser.PDFStreamParser.parseNextToken() once the end is reached.

I'm not sure if I like that behaviour as it isn't transparent to the user .... maybe we should refactor that first.

So why isn't it protected (PDFStreamParser.close)?

valerybokov avatar Oct 16 '25 07:10 valerybokov