File tree Expand file tree Collapse file tree
pdfbox/src/test/java/org/apache/pdfbox/cos Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444import java .io .File ;
4545import java .io .FileOutputStream ;
4646import java .io .IOException ;
47+ import java .io .OutputStream ;
4748
4849import java .net .URI ;
4950import java .net .URISyntaxException ;
@@ -311,7 +312,8 @@ void testSubsetting() throws IOException
311312 document .save (baos );
312313 }
313314
314- try (PDDocument document = Loader .loadPDF (baos .toByteArray ()))
315+ try (PDDocument document = Loader .loadPDF (baos .toByteArray ());
316+ OutputStream os = new FileOutputStream ("target/test-output/PDFBOX-5627.pdf" ))
315317 {
316318 PDPage page = document .getPage (0 );
317319
@@ -333,7 +335,7 @@ void testSubsetting() throws IOException
333335 pages .setNeedToBeUpdated (true );
334336 page .getCOSObject ().setNeedToBeUpdated (true );
335337
336- document .saveIncremental (new FileOutputStream ( "target/test-output/PDFBOX-5627.pdf" ) );
338+ document .saveIncremental (os );
337339 }
338340
339341 try (PDDocument document = Loader .loadPDF (new File ("target/test-output/PDFBOX-5627.pdf" )))
You can’t perform that action at this time.
0 commit comments