pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1800896 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java
Date Wed, 05 Jul 2017 16:17:51 GMT
Author: tilman
Date: Wed Jul  5 16:17:50 2017
New Revision: 1800896

URL: http://svn.apache.org/viewvc?rev=1800896&view=rev
Log:
PDFBOX-3852: create COSStream using existing scratch file

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java?rev=1800896&r1=1800895&r2=1800896&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java Wed Jul
 5 16:17:50 2017
@@ -286,7 +286,7 @@ public class Overlay
     {
         List<COSStream> contentStreams = createContentStreamList(contents);
         // concatenate streams
-        COSStream concatStream = new COSStream();
+        COSStream concatStream = inputPDFDocument.getDocument().createCOSStream();
         OutputStream out = concatStream.createOutputStream(COSName.FLATE_DECODE);
         for (COSStream contentStream : contentStreams)
         {
@@ -471,7 +471,7 @@ public class Overlay
     
     private COSStream createStream(String content) throws IOException
     {
-        COSStream stream = new COSStream();
+        COSStream stream = inputPDFDocument.getDocument().createCOSStream();
         OutputStream out = stream.createOutputStream(COSName.FLATE_DECODE);
         out.write(content.getBytes("ISO-8859-1"));
         out.close();



Mime
View raw message