pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Warning about document close
Date Tue, 16 May 2017 09:51:31 GMT
Am 16.05.2017 um 08:54 schrieb Vassallo, Fabio:
> Good morning.
> In my job I have to create several kind of documents.
> I also have a user task that allows to create a single document by 
> merging some (or many) of these documents.
> So I create each document to merge, create and save the merged 
> document, close it.
> After that I call PDDocument.close() on each of the original document.
> Everything works fine if I merge a little number of PDDocuments (I’m 
> sure I call close() on each one); but if I merge many documents (and 
> so the procedure last a longer time), I get a warning:
> Warning: You did not close a PDF Document

Hard to tell without code. You must close every PDDocument that you open 
or create. Use "try with resources" if possible.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message