Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.12
-
None
Description
Hi,
Having migrated from 2.0.11 to 2.0.12. I am facing the following issue:
When merging multiple pdf files into one, I can no longer delete the source files.
Here is a sample code (worked in 2.0.11):
public void mergePDFFiles(List<File> inFiles, File outFile) throws InvalidPasswordException, IOException { try (OutputStream out = new BufferedOutputStream(new FileOutputStream(outFile))) { PDFMergerUtility merger = new PDFMergerUtility(); merger.setDestinationStream(out); for(File toMerge : inFiles) { merger.addSource(toMerge); } merger.mergeDocuments(MemoryUsageSetting.setupMainMemoryOnly()); } for(File f : inFiles) { // IOException thrown FileUtils.forceDelete(f); } }
Has something changed or do I do something wrong ?
Br,
David Schreck
Attachments
Issue Links
- relates to
-
PDFBOX-4295 Don't create intermediate streams when merging files
- Closed