pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vassallo, Fabio" <Fabio.Vassa...@wuerth-phoenix.com>
Subject RE: Warning about document close
Date Thu, 25 May 2017 06:48:15 GMT
Good morning.
Yesterday I finally had the time to thoroughly debug  my code: it was actually my fault.
In certain cases I didn't close a document and PDFBox was right to point it out.

Thank you,

Fabio Vassallo
Product Development (CIS)

Würth Phoenix S.r.l.
via Kravogl 4, 39100 Bolzano
T: +39 0471 564 116
F: +39 0471 564 122
Website | e-Mail | Map


-----Original Message-----
From: Tilman Hausherr [mailto:THausherr@t-online.de] 
Sent: Tuesday, May 16, 2017 11:52 AM
To: users@pdfbox.apache.org
Subject: Re: Warning about document close

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.


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

View raw message