pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1801870 - /pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/CreateGradientShadingPDF.java
Date Thu, 13 Jul 2017 19:39:55 GMT
Author: tilman
Date: Thu Jul 13 19:39:55 2017
New Revision: 1801870

URL: http://svn.apache.org/viewvc?rev=1801870&view=rev
Log:
PDFBOX-3868: avoid memory hungry COSStream constructor

Modified:
    pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/CreateGradientShadingPDF.java

Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/CreateGradientShadingPDF.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/CreateGradientShadingPDF.java?rev=1801870&r1=1801869&r2=1801870&view=diff
==============================================================================
--- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/CreateGradientShadingPDF.java
(original)
+++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/CreateGradientShadingPDF.java
Thu Jul 13 19:39:55 2017
@@ -114,7 +114,7 @@ public class CreateGradientShadingPDF
             // Gouraud shading
             // See PDF 32000 specification,
             // 8.7.4.5.5 Type 4 Shadings (Free-Form Gouraud-Shaded Triangle Meshes)
-            PDShadingType4 gouraudShading = new PDShadingType4(new COSStream());
+            PDShadingType4 gouraudShading = new PDShadingType4(document.getDocument().createCOSStream());
             gouraudShading.setShadingType(PDShading.SHADING_TYPE4);
             // we use multiple of 8, so that no padding is needed
             gouraudShading.setBitsPerFlag(8);



Mime
View raw message