-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.12
-
Fix Version/s: 2.0.13, 3.0.0 PDFBox
-
Component/s: Utilities
-
Labels:None
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
- relates to
-
PDFBOX-4295 Don't create intermediate streams when merging files
-
- Closed
-