Author: tilman
Date: Fri Feb 21 20:19:30 2020
New Revision: 1874333

URL: http://svn.apache.org/viewvc?rev=1874333&view=rev
Log:
PDFBOX-4783: zero-sized rectangles are not valid, again

Modified:
    
pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java

Modified: 
pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
URL: 
http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java?rev=1874333&r1=1874332&r2=1874333&view=diff
==============================================================================
--- 
pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
 (original)
+++ 
pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
 Fri Feb 21 20:19:30 2020
@@ -310,7 +310,8 @@ public abstract class PDFStreamEngine
         Matrix matrix = appearance.getMatrix();
 
         // zero-sized rectangles are not valid
-        if (rect != null && rect.getWidth() > 0 && rect.getHeight() > 0 && 
bbox != null)
+        if (rect != null && rect.getWidth() > 0 && rect.getHeight() > 0 &&
+            bbox != null && bbox.getWidth() > 0 && bbox.getHeight() > 0)
         {
             // transformed appearance box  fixme: may be an arbitrary shape
             Rectangle2D transformedBox = bbox.transform(matrix).getBounds2D();


Reply via email to