pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1858699 - in /pdfbox/trunk: ./ pdfbox/pom.xml pdfbox/src/test/java/org/apache/pdfbox/filter/TestFilters.java
Date Sun, 05 May 2019 17:32:17 GMT
Author: lehmi
Date: Sun May  5 17:32:17 2019
New Revision: 1858699

URL: http://svn.apache.org/viewvc?rev=1858699&view=rev
Log:
PDFBOX-4517: added test for identity filter as proposed by Jerome Joslet

Modified:
    pdfbox/trunk/   (props changed)
    pdfbox/trunk/pdfbox/pom.xml
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/filter/TestFilters.java

Propchange: pdfbox/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun May  5 17:32:17 2019
@@ -1,3 +1,3 @@
-/pdfbox/branches/2.0:1760418,1761484,1762133,1763609,1779822,1780783,1780789,1782684,1784450,1792784,1795704,1795712,1799081-1799082,1814046,1814285,1814459,1824914,1825811,1825820,1825912,1844477,1844516,1844519,1844567,1850577,1857953,1858696
+/pdfbox/branches/2.0:1760418,1761484,1762133,1763609,1779822,1780783,1780789,1782684,1784450,1792784,1795704,1795712,1799081-1799082,1814046,1814285,1814459,1824914,1825811,1825820,1825912,1844477,1844516,1844519,1844567,1850577,1857953,1858696,1858698
 /pdfbox/branches/no-awt:1618517-1621410
 /pdfbox/no-awt:1618514-1618516

Modified: pdfbox/trunk/pdfbox/pom.xml
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/pom.xml?rev=1858699&r1=1858698&r2=1858699&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/pom.xml (original)
+++ pdfbox/trunk/pdfbox/pom.xml Sun May  5 17:32:17 2019
@@ -633,6 +633,19 @@
                             <sha512>42a61d0061b0b3b0bcc92c9f3ddc78daca79e9d5ea56c19796270316fb7cf3858db9f51efafa3776e1fef17f85202b35c8eed0e88ba6b7ebc7bb05c6014b9fc8</sha512>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>PDFBOX-4517</id>
+                        <phase>generate-test-resources</phase>
+                        <goals>
+                            <goal>wget</goal>
+                        </goals>
+                        <configuration>
+                            <url>https://issues.apache.org/jira/secure/attachment/12966453/cryptfilter.pdf</url>
+                            <outputDirectory>${project.build.directory}/pdfs</outputDirectory>
+                            <outputFileName>PDFBOX-4517-cryptfilter.pdf</outputFileName>
+                            <sha512>ed55a65bad6f91104846d28e9e7dcb18b11efbf980a74781350551428bbaecba375d9e22af02edf0f91263c7f668e93ec7c52d397898b7640c2d60e7dd3ae940</sha512>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>
         </plugins>

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/filter/TestFilters.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/filter/TestFilters.java?rev=1858699&r1=1858698&r2=1858699&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/filter/TestFilters.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/filter/TestFilters.java Sun May  5
17:32:17 2019
@@ -18,6 +18,7 @@ package org.apache.pdfbox.filter;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.Random;
@@ -27,6 +28,7 @@ import junit.framework.TestCase;
 import org.apache.pdfbox.cos.COSDictionary;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.io.IOUtils;
+import org.apache.pdfbox.pdmodel.PDDocument;
 
 /**
  * This will test all of the filters in the PDFBox system.
@@ -115,6 +117,17 @@ public class TestFilters extends TestCas
         }
     }
     
+    /**
+     * This will test the use of identity filter to decode stream and string.
+     * This test threw an IOException before the correction.
+     * 
+     * @throws IOException
+     */
+    public void testPDFBOX4517() throws IOException
+    {
+        PDDocument.load(new File("target/pdfs/PDFBOX-4517-cryptfilter.pdf"),
+                "userpassword1234");
+    }
 
     /**
      * This will test the LZW filter with the sequence that failed in PDFBOX-1777.



Mime
View raw message