pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1788499 - /pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddImageToPDF.java
Date Fri, 24 Mar 2017 16:39:04 GMT
Author: tilman
Date: Fri Mar 24 16:39:04 2017
New Revision: 1788499

URL: http://svn.apache.org/viewvc?rev=1788499&view=rev
Log:
PDFBOX-3733: reset context

Modified:
    pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddImageToPDF.java

Modified: pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddImageToPDF.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddImageToPDF.java?rev=1788499&r1=1788498&r2=1788499&view=diff
==============================================================================
--- pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddImageToPDF.java
(original)
+++ pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddImageToPDF.java
Fri Mar 24 16:39:04 2017
@@ -58,7 +58,7 @@ public class AddImageToPDF
             // if you already have the image in a BufferedImage, 
             // call LosslessFactory.createFromImage() instead
             PDImageXObject pdImage = PDImageXObject.createFromFile(imagePath, doc);
-            PDPageContentStream contentStream = new PDPageContentStream(doc, page, AppendMode.APPEND,
true);
+            PDPageContentStream contentStream = new PDPageContentStream(doc, page, AppendMode.APPEND,
true, true);
 
             // contentStream.drawImage(ximage, 20, 20 );
             // better method inspired by http://stackoverflow.com/a/22318681/535646



Mime
View raw message