pdfbox-commits mailing list archives

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

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

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

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



Mime
View raw message