pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1868015 [2/3] - in /pdfbox/branches/issue4569/pdfbox/src: main/java/org/apache/pdfbox/multipdf/ main/java/org/apache/pdfbox/pdfparser/ main/java/org/apache/pdfbox/pdfwriter/ main/java/org/apache/pdfbox/pdmodel/ main/java/org/apache/pdfbox/...
Date Sat, 05 Oct 2019 13:23:29 GMT
Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java Sat Oct  5 13:23:29 2019
@@ -30,8 +30,6 @@ import java.util.Map;
 import java.util.Set;
 
 import junit.framework.TestCase;
-import static junit.framework.TestCase.assertEquals;
-import static junit.framework.TestCase.fail;
 import org.apache.pdfbox.cos.COSArray;
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSDictionary;
@@ -40,6 +38,7 @@ import org.apache.pdfbox.cos.COSObject;
 
 import org.apache.pdfbox.io.MemoryUsageSetting;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.PDPageTree;
@@ -176,7 +175,8 @@ public class PDFMergerUtilityTest extend
         pdfMergerUtility.setDestinationFileName(TARGETTESTDIR + "MergerOpenActionTestResult.pdf");
         pdfMergerUtility.mergeDocuments(MemoryUsageSetting.setupMainMemoryOnly());
 
-        try (PDDocument mergedDoc = PDDocument.load(new File(TARGETTESTDIR, "MergerOpenActionTestResult.pdf")))
+        try (PDDocument mergedDoc = PDFParser
+                .load(new File(TARGETTESTDIR, "MergerOpenActionTestResult.pdf")))
         {
             PDDocumentCatalog documentCatalog = mergedDoc.getDocumentCatalog();
             dest = (PDPageDestination) documentCatalog.getOpenAction();
@@ -193,7 +193,8 @@ public class PDFMergerUtilityTest extend
     public void testStructureTreeMerge() throws IOException
     {
         PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
-        PDDocument src = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-3999-GeneralForbearance.pdf"));
+        PDDocument src = PDFParser
+                .load(new File(TARGETPDFDIR, "PDFBOX-3999-GeneralForbearance.pdf"));
 
         ElementCounter elementCounter = new ElementCounter();
         elementCounter.walk(src.getDocumentCatalog().getStructureTreeRoot().getK());
@@ -202,13 +203,15 @@ public class PDFMergerUtilityTest extend
         assertEquals(134, singleCnt);
         assertEquals(134, singleSetSize);
 
-        PDDocument dst = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-3999-GeneralForbearance.pdf"));
+        PDDocument dst = PDFParser
+                .load(new File(TARGETPDFDIR, "PDFBOX-3999-GeneralForbearance.pdf"));
         pdfMergerUtility.appendDocument(dst, src);
         src.close();
         dst.save(new File(TARGETTESTDIR, "PDFBOX-3999-GeneralForbearance-merged.pdf"));
         dst.close();
 
-        PDDocument doc = PDDocument.load(new File(TARGETTESTDIR, "PDFBOX-3999-GeneralForbearance-merged.pdf"));
+        PDDocument doc = PDFParser
+                .load(new File(TARGETTESTDIR, "PDFBOX-3999-GeneralForbearance-merged.pdf"));
 
         // Assume that the merged tree has double element count
         elementCounter = new ElementCounter();
@@ -229,7 +232,8 @@ public class PDFMergerUtilityTest extend
     public void testStructureTreeMerge2() throws IOException
     {
         PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
-        PDDocument doc = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-3999-GeneralForbearance.pdf"));
+        PDDocument doc = PDFParser
+                .load(new File(TARGETPDFDIR, "PDFBOX-3999-GeneralForbearance.pdf"));
         doc.getDocumentCatalog().getAcroForm().flatten();
         doc.save(new File(TARGETTESTDIR, "PDFBOX-3999-GeneralForbearance-flattened.pdf"));
 
@@ -242,8 +246,10 @@ public class PDFMergerUtilityTest extend
 
         doc.close();
 
-        PDDocument src = PDDocument.load(new File(TARGETTESTDIR, "PDFBOX-3999-GeneralForbearance-flattened.pdf"));
-        PDDocument dst = PDDocument.load(new File(TARGETTESTDIR, "PDFBOX-3999-GeneralForbearance-flattened.pdf"));
+        PDDocument src = PDFParser
+                .load(new File(TARGETTESTDIR, "PDFBOX-3999-GeneralForbearance-flattened.pdf"));
+        PDDocument dst = PDFParser
+                .load(new File(TARGETTESTDIR, "PDFBOX-3999-GeneralForbearance-flattened.pdf"));
         pdfMergerUtility.appendDocument(dst, src);
         // before solving PDFBOX-3999, the close() below brought
         // IOException: COSStream has been closed and cannot be read.
@@ -251,7 +257,8 @@ public class PDFMergerUtilityTest extend
         dst.save(new File(TARGETTESTDIR, "PDFBOX-3999-GeneralForbearance-flattened-merged.pdf"));
         dst.close();
 
-        doc = PDDocument.load(new File(TARGETTESTDIR, "PDFBOX-3999-GeneralForbearance-flattened-merged.pdf"));
+        doc = PDFParser.load(
+                new File(TARGETTESTDIR, "PDFBOX-3999-GeneralForbearance-flattened-merged.pdf"));
 
         checkForPageOrphans(doc);
 
@@ -273,7 +280,7 @@ public class PDFMergerUtilityTest extend
     public void testStructureTreeMerge3() throws IOException
     {
         PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
-        PDDocument src = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4408.pdf"));
+        PDDocument src = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4408.pdf"));
 
         ElementCounter elementCounter = new ElementCounter();
         elementCounter.walk(src.getDocumentCatalog().getStructureTreeRoot().getK());
@@ -282,13 +289,13 @@ public class PDFMergerUtilityTest extend
         assertEquals(25, singleCnt);
         assertEquals(25, singleSetSize);
 
-        PDDocument dst = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4408.pdf"));
+        PDDocument dst = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4408.pdf"));
         pdfMergerUtility.appendDocument(dst, src);
         src.close();
         dst.save(new File(TARGETTESTDIR, "PDFBOX-4408-merged.pdf"));
         dst.close();
 
-        dst = PDDocument.load(new File(TARGETTESTDIR, "PDFBOX-4408-merged.pdf"));
+        dst = PDFParser.load(new File(TARGETTESTDIR, "PDFBOX-4408-merged.pdf"));
 
         // Assume that the merged tree has double element count
         elementCounter = new ElementCounter();
@@ -311,7 +318,7 @@ public class PDFMergerUtilityTest extend
     public void testStructureTreeMerge4() throws IOException
     {
         PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
-        PDDocument src = PDDocument.load(new File(SRCDIR, "PDFBOX-4417-001031.pdf"));
+        PDDocument src = PDFParser.load(new File(SRCDIR, "PDFBOX-4417-001031.pdf"));
 
         ElementCounter elementCounter = new ElementCounter();
         elementCounter.walk(src.getDocumentCatalog().getStructureTreeRoot().getK());
@@ -320,12 +327,12 @@ public class PDFMergerUtilityTest extend
         assertEquals(104, singleCnt);
         assertEquals(104, singleSetSize);
 
-        PDDocument dst = PDDocument.load(new File(SRCDIR, "PDFBOX-4417-001031.pdf"));
+        PDDocument dst = PDFParser.load(new File(SRCDIR, "PDFBOX-4417-001031.pdf"));
         pdfMergerUtility.appendDocument(dst, src);
         src.close();
         dst.save(new File(TARGETTESTDIR, "PDFBOX-4417-001031-merged.pdf"));
         dst.close();
-        dst = PDDocument.load(new File(TARGETTESTDIR, "PDFBOX-4417-001031-merged.pdf"));
+        dst = PDFParser.load(new File(TARGETTESTDIR, "PDFBOX-4417-001031-merged.pdf"));
 
         // Assume that the merged tree has double element count
         elementCounter = new ElementCounter();
@@ -348,19 +355,19 @@ public class PDFMergerUtilityTest extend
     public void testStructureTreeMerge5() throws IOException
     {
         PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
-        PDDocument src = PDDocument.load(new File(SRCDIR, "PDFBOX-4417-054080.pdf"));
+        PDDocument src = PDFParser.load(new File(SRCDIR, "PDFBOX-4417-054080.pdf"));
 
         ElementCounter elementCounter = new ElementCounter();
         elementCounter.walk(src.getDocumentCatalog().getStructureTreeRoot().getK());
         int singleCnt = elementCounter.cnt;
         int singleSetSize = elementCounter.set.size();
 
-        PDDocument dst = PDDocument.load(new File(SRCDIR, "PDFBOX-4417-054080.pdf"));
+        PDDocument dst = PDFParser.load(new File(SRCDIR, "PDFBOX-4417-054080.pdf"));
         pdfMergerUtility.appendDocument(dst, src);
         src.close();
         dst.save(new File(TARGETTESTDIR, "PDFBOX-4417-054080-merged.pdf"));
         dst.close();
-        dst = PDDocument.load(new File(TARGETTESTDIR, "PDFBOX-4417-054080-merged.pdf"));
+        dst = PDFParser.load(new File(TARGETTESTDIR, "PDFBOX-4417-054080-merged.pdf"));
         checkWithNumberTree(dst);
         checkForPageOrphans(dst);
 
@@ -383,7 +390,7 @@ public class PDFMergerUtilityTest extend
     public void testStructureTreeMerge6() throws IOException
     {
         PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
-        PDDocument src = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4418-000671.pdf"));
+        PDDocument src = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4418-000671.pdf"));
 
         PDStructureTreeRoot structureTreeRoot = src.getDocumentCatalog().getStructureTreeRoot();
         PDNumberTreeNode parentTree = structureTreeRoot.getParentTree();
@@ -393,7 +400,7 @@ public class PDFMergerUtilityTest extend
         assertEquals(0, (int) Collections.min(numberTreeAsMap.keySet()));
         assertEquals(743, structureTreeRoot.getParentTreeNextKey());        
 
-        PDDocument dst = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4418-000314.pdf"));
+        PDDocument dst = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4418-000314.pdf"));
 
         structureTreeRoot = dst.getDocumentCatalog().getStructureTreeRoot();
         parentTree = structureTreeRoot.getParentTree();
@@ -409,7 +416,7 @@ public class PDFMergerUtilityTest extend
         dst.save(new File(TARGETTESTDIR, "PDFBOX-4418-merged.pdf"));
         dst.close();
 
-        dst = PDDocument.load(new File(TARGETTESTDIR, "PDFBOX-4418-merged.pdf"));
+        dst = PDFParser.load(new File(TARGETTESTDIR, "PDFBOX-4418-merged.pdf"));
         checkWithNumberTree(dst);
         checkForPageOrphans(dst);
 
@@ -433,7 +440,7 @@ public class PDFMergerUtilityTest extend
     public void testStructureTreeMerge7() throws IOException
     {
         PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
-        PDDocument src = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4423-000746.pdf"));
+        PDDocument src = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4423-000746.pdf"));
 
         PDStructureTreeRoot structureTreeRoot = src.getDocumentCatalog().getStructureTreeRoot();
         PDNumberTreeNode parentTree = structureTreeRoot.getParentTree();
@@ -450,7 +457,7 @@ public class PDFMergerUtilityTest extend
         dst.save(new File(TARGETTESTDIR, "PDFBOX-4423-merged.pdf"));
         dst.close();
 
-        dst = PDDocument.load(new File(TARGETTESTDIR, "PDFBOX-4423-merged.pdf"));
+        dst = PDFParser.load(new File(TARGETTESTDIR, "PDFBOX-4423-merged.pdf"));
         checkWithNumberTree(dst);
         checkForPageOrphans(dst);
 
@@ -472,8 +479,8 @@ public class PDFMergerUtilityTest extend
     public void testMissingParentTreeNextKey() throws IOException
     {
         PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
-        PDDocument src = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4418-000314.pdf"));
-        PDDocument dst = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4418-000314.pdf"));
+        PDDocument src = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4418-000314.pdf"));
+        PDDocument dst = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4418-000314.pdf"));
         // existing numbers are 321..327; ParentTreeNextKey is 408. 
         // After deletion, it is recalculated in the merge 328.
         // That value is added to all numbers of the destination,
@@ -484,7 +491,7 @@ public class PDFMergerUtilityTest extend
         src.close();
         dst.save(new File(TARGETTESTDIR, "PDFBOX-4418-000314-merged.pdf"));
         dst.close();
-        dst = PDDocument.load(new File(TARGETTESTDIR, "PDFBOX-4418-000314-merged.pdf"));
+        dst = PDFParser.load(new File(TARGETTESTDIR, "PDFBOX-4418-000314-merged.pdf"));
         assertEquals(656, dst.getDocumentCatalog().getStructureTreeRoot().getParentTreeNextKey());
         dst.close();
     }
@@ -499,8 +506,8 @@ public class PDFMergerUtilityTest extend
     public void testStructureTreeMergeIDTree() throws IOException
     {
         PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
-        PDDocument src = PDDocument.load(new File(SRCDIR, "PDFBOX-4417-001031.pdf"));
-        PDDocument dst = PDDocument.load(new File(SRCDIR, "PDFBOX-4417-054080.pdf"));
+        PDDocument src = PDFParser.load(new File(SRCDIR, "PDFBOX-4417-001031.pdf"));
+        PDDocument dst = PDFParser.load(new File(SRCDIR, "PDFBOX-4417-054080.pdf"));
 
         PDNameTreeNode<PDStructureElement> srcIDTree = src.getDocumentCatalog().getStructureTreeRoot().getIDTree();
         Map<String, PDStructureElement> srcIDTreeMap = PDFMergerUtility.getIDTreeAsMap(srcIDTree);
@@ -521,7 +528,7 @@ public class PDFMergerUtilityTest extend
         src.close();
         dst.save(new File(TARGETTESTDIR, "PDFBOX-4416-IDTree-merged.pdf"));
         dst.close();
-        dst = PDDocument.load(new File(TARGETTESTDIR, "PDFBOX-4416-IDTree-merged.pdf"));
+        dst = PDFParser.load(new File(TARGETTESTDIR, "PDFBOX-4416-IDTree-merged.pdf"));
         checkWithNumberTree(dst);
         checkForPageOrphans(dst);
 
@@ -542,8 +549,8 @@ public class PDFMergerUtilityTest extend
     public void testMergeBogusStructParents1() throws IOException
     {
         PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
-        PDDocument src = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4408.pdf"));
-        PDDocument dst = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4408.pdf"));
+        PDDocument src = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4408.pdf"));
+        PDDocument dst = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4408.pdf"));
         dst.getDocumentCatalog().setStructureTreeRoot(null);
         dst.getPage(0).setStructParents(9999);
         dst.getPage(0).getAnnotations().get(0).setStructParent(9998);
@@ -563,8 +570,8 @@ public class PDFMergerUtilityTest extend
     public void testMergeBogusStructParents2() throws IOException
     {
         PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
-        PDDocument src = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4408.pdf"));
-        PDDocument dst = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4408.pdf"));
+        PDDocument src = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4408.pdf"));
+        PDDocument dst = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4408.pdf"));
         src.getDocumentCatalog().setStructureTreeRoot(null);
         src.getPage(0).setStructParents(9999);
         src.getPage(0).getAnnotations().get(0).setStructParent(9998);
@@ -583,7 +590,8 @@ public class PDFMergerUtilityTest extend
      */
     public void testParentTree() throws IOException
     {
-        PDDocument doc = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-3999-GeneralForbearance.pdf"));
+        PDDocument doc = PDFParser
+                .load(new File(TARGETPDFDIR, "PDFBOX-3999-GeneralForbearance.pdf"));
         PDStructureTreeRoot structureTreeRoot = doc.getDocumentCatalog().getStructureTreeRoot();
         PDNumberTreeNode parentTree = structureTreeRoot.getParentTree();
         parentTree.getValue(0);
@@ -855,7 +863,7 @@ public class PDFMergerUtilityTest extend
     {
         int src1PageCount;
         BufferedImage[] src1ImageTab;
-        try (PDDocument srcDoc1 = PDDocument.load(new File(SRCDIR, filename1), (String) null))
+        try (PDDocument srcDoc1 = PDFParser.load(new File(SRCDIR, filename1), (String) null))
         {
             src1PageCount = srcDoc1.getNumberOfPages();
             PDFRenderer src1PdfRenderer = new PDFRenderer(srcDoc1);
@@ -868,7 +876,7 @@ public class PDFMergerUtilityTest extend
 
         int src2PageCount;
         BufferedImage[] src2ImageTab;
-        try (PDDocument srcDoc2 = PDDocument.load(new File(SRCDIR, filename2), (String) null))
+        try (PDDocument srcDoc2 = PDFParser.load(new File(SRCDIR, filename2), (String) null))
         {
             src2PageCount = srcDoc2.getNumberOfPages();
             PDFRenderer src2PdfRenderer = new PDFRenderer(srcDoc2);
@@ -885,7 +893,8 @@ public class PDFMergerUtilityTest extend
         pdfMergerUtility.setDestinationFileName(TARGETTESTDIR + mergeFilename);
         pdfMergerUtility.mergeDocuments(memUsageSetting);
 
-        try (PDDocument mergedDoc = PDDocument.load(new File(TARGETTESTDIR, mergeFilename), (String) null))
+        try (PDDocument mergedDoc = PDFParser.load(new File(TARGETTESTDIR, mergeFilename),
+                (String) null))
         {
             PDFRenderer mergePdfRenderer = new PDFRenderer(mergedDoc);
             int mergePageCount = mergedDoc.getNumberOfPages();

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PageExtractorTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PageExtractorTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PageExtractorTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PageExtractorTest.java Sat Oct  5 13:23:29 2019
@@ -18,7 +18,9 @@ package org.apache.pdfbox.multipdf;
 
 import java.io.File;
 import junit.framework.TestCase;
+
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 
 /**
  * Test suite for PageExtractor.
@@ -72,7 +74,7 @@ public class PageExtractorTest extends T
         try
         {
             // this should work for most users
-            sourcePdf = PDDocument.load(new File("src/test/resources/input/cweb.pdf"));
+            sourcePdf = PDFParser.load(new File("src/test/resources/input/cweb.pdf"));
             PageExtractor instance = new PageExtractor(sourcePdf);
             result = instance.extract();
             assertEquals(sourcePdf.getNumberOfPages(), result.getNumberOfPages());

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/multipdf/TestLayerUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/multipdf/TestLayerUtility.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/multipdf/TestLayerUtility.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/multipdf/TestLayerUtility.java Sat Oct  5 13:23:29 2019
@@ -25,6 +25,7 @@ import junit.framework.TestCase;
 
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.PDResources;
@@ -65,8 +66,8 @@ public class TestLayerUtility extends Te
         File overlay1 = createOverlay1();
         File targetFile = new File(testResultsDir, "text-with-form-overlay.pdf");
 
-        try (PDDocument targetDoc = PDDocument.load(mainPDF);
-             PDDocument overlay1Doc = PDDocument.load(overlay1))
+        try (PDDocument targetDoc = PDFParser.load(mainPDF);
+                PDDocument overlay1Doc = PDFParser.load(overlay1))
         {
             LayerUtility layerUtil = new LayerUtility(targetDoc);
             PDFormXObject form = layerUtil.importPageAsForm(overlay1Doc, 0);
@@ -78,7 +79,7 @@ public class TestLayerUtility extends Te
             targetDoc.save(targetFile.getAbsolutePath());
         }
 
-        try (PDDocument doc = PDDocument.load(targetFile))
+        try (PDDocument doc = PDFParser.load(targetFile))
         {
             PDDocumentCatalog catalog = doc.getDocumentCatalog();
 

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/EndstreamOutputStreamTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/EndstreamOutputStreamTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/EndstreamOutputStreamTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/EndstreamOutputStreamTest.java Sat Oct  5 13:23:29 2019
@@ -116,7 +116,7 @@ public class EndstreamOutputStreamTest
 
         // Modification of embedded_zip.pdf for 2.0:
         // /Length entry removed to force usage of EndstreamOutputStream
-        try (PDDocument doc = PDDocument.load(
+        try (PDDocument doc = PDFParser.load(
                 new File("src/test/resources/org/apache/pdfbox/pdfparser", "embedded_zip.pdf")))
         {
             PDDocumentCatalog catalog = doc.getDocumentCatalog();

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/TestPDFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/TestPDFParser.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/TestPDFParser.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/TestPDFParser.java Sat Oct  5 13:23:29 2019
@@ -115,7 +115,8 @@ public class TestPDFParser
     public void testPDFParserMissingCatalog() throws IOException, URISyntaxException
     {
         // PDFBOX-3060
-        PDDocument.load(new File(TestPDFParser.class.getResource("MissingCatalog.pdf").toURI())).close();
+        PDFParser.load(new File(TestPDFParser.class.getResource("MissingCatalog.pdf").toURI()))
+                .close();
     }
 
     /**
@@ -128,7 +129,8 @@ public class TestPDFParser
     @Test
     public void testPDFBox3208() throws IOException
     {
-        try (PDDocument doc = PDDocument.load(new File(TARGETPDFDIR,"PDFBOX-3208-L33MUTT2SVCWGCS6UIYL5TH3PNPXHIS6.pdf")))
+        try (PDDocument doc = PDFParser
+                .load(new File(TARGETPDFDIR, "PDFBOX-3208-L33MUTT2SVCWGCS6UIYL5TH3PNPXHIS6.pdf")))
         {
             PDDocumentInformation di = doc.getDocumentInformation();
             assertEquals("Liquent Enterprise Services", di.getAuthor());
@@ -151,7 +153,7 @@ public class TestPDFParser
     @Test
     public void testPDFBox3940() throws IOException
     {
-        try (PDDocument doc = PDDocument.load(new File(TARGETPDFDIR,"PDFBOX-3940-079977.pdf")))
+        try (PDDocument doc = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-3940-079977.pdf")))
         {
             PDDocumentInformation di = doc.getDocumentInformation();
             assertEquals("Unknown", di.getAuthor());
@@ -172,7 +174,8 @@ public class TestPDFParser
     @Test
     public void testPDFBox3783() throws IOException
     {
-        PDDocument.load(new File(TARGETPDFDIR,"PDFBOX-3783-72GLBIGUC6LB46ELZFBARRJTLN4RBSQM.pdf")).close();
+        PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-3783-72GLBIGUC6LB46ELZFBARRJTLN4RBSQM.pdf"))
+                .close();
     }
 
     /**
@@ -184,7 +187,7 @@ public class TestPDFParser
     @Test
     public void testPDFBox3785() throws IOException
     {
-        try (PDDocument doc = PDDocument.load(new File(TARGETPDFDIR,"PDFBOX-3785-202097.pdf")))
+        try (PDDocument doc = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-3785-202097.pdf")))
         {
             assertEquals(11, doc.getNumberOfPages());
         }
@@ -198,7 +201,7 @@ public class TestPDFParser
     @Test
     public void testPDFBox3947() throws IOException
     {
-        PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-3947-670064.pdf")).close();
+        PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-3947-670064.pdf")).close();
     }
 
     /**
@@ -209,7 +212,8 @@ public class TestPDFParser
     @Test
     public void testPDFBox3948() throws IOException
     {
-        PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-3948-EUWO6SQS5TM4VGOMRD3FLXZHU35V2CP2.pdf")).close();
+        PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-3948-EUWO6SQS5TM4VGOMRD3FLXZHU35V2CP2.pdf"))
+                .close();
     }
 
     /**
@@ -220,7 +224,8 @@ public class TestPDFParser
     @Test
     public void testPDFBox3949() throws IOException
     {
-        PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-3949-MKFYUGZWS3OPXLLVU2Z4LWCTVA5WNOGF.pdf")).close();
+        PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-3949-MKFYUGZWS3OPXLLVU2Z4LWCTVA5WNOGF.pdf"))
+                .close();
     }
 
     /**
@@ -231,7 +236,8 @@ public class TestPDFParser
     @Test
     public void testPDFBox3950() throws IOException
     {
-        try (PDDocument doc = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-3950-23EGDHXSBBYQLKYOKGZUOVYVNE675PRD.pdf")))
+        try (PDDocument doc = PDFParser
+                .load(new File(TARGETPDFDIR, "PDFBOX-3950-23EGDHXSBBYQLKYOKGZUOVYVNE675PRD.pdf")))
         {
             assertEquals(4, doc.getNumberOfPages());
             PDFRenderer renderer = new PDFRenderer(doc);
@@ -261,7 +267,8 @@ public class TestPDFParser
     @Test
     public void testPDFBox3951() throws IOException
     {
-        try (PDDocument doc = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-3951-FIHUZWDDL2VGPOE34N6YHWSIGSH5LVGZ.pdf")))
+        try (PDDocument doc = PDFParser
+                .load(new File(TARGETPDFDIR, "PDFBOX-3951-FIHUZWDDL2VGPOE34N6YHWSIGSH5LVGZ.pdf")))
         {
             assertEquals(143, doc.getNumberOfPages());
         }
@@ -275,7 +282,8 @@ public class TestPDFParser
     @Test
     public void testPDFBox3964() throws IOException
     {
-        try (PDDocument doc = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-3964-c687766d68ac766be3f02aaec5e0d713_2.pdf")))
+        try (PDDocument doc = PDFParser
+                .load(new File(TARGETPDFDIR, "PDFBOX-3964-c687766d68ac766be3f02aaec5e0d713_2.pdf")))
         {
             assertEquals(10, doc.getNumberOfPages());
         }
@@ -290,7 +298,8 @@ public class TestPDFParser
     @Test
     public void testPDFBox3977() throws IOException
     {
-        try (PDDocument doc = PDDocument.load(new File(TARGETPDFDIR,"PDFBOX-3977-63NGFQRI44HQNPIPEJH5W2TBM6DJZWMI.pdf")))
+        try (PDDocument doc = PDFParser
+                .load(new File(TARGETPDFDIR, "PDFBOX-3977-63NGFQRI44HQNPIPEJH5W2TBM6DJZWMI.pdf")))
         {
             PDDocumentInformation di = doc.getDocumentInformation();
             assertEquals("QuarkXPress(tm) 6.52", di.getCreator());
@@ -309,7 +318,7 @@ public class TestPDFParser
     @Test
     public void testParseGenko() throws IOException
     {
-        PDDocument.load(new File(TARGETPDFDIR, "genko_oc_shiryo1.pdf")).close();
+        PDFParser.load(new File(TARGETPDFDIR, "genko_oc_shiryo1.pdf")).close();
     }
 
     /**
@@ -321,7 +330,7 @@ public class TestPDFParser
     @Test
     public void testPDFBox4338() throws IOException
     {
-        PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4338.pdf")).close();
+        PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4338.pdf")).close();
     }
 
     /**
@@ -333,7 +342,7 @@ public class TestPDFParser
     @Test
     public void testPDFBox4339() throws IOException
     {
-        PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4339.pdf")).close();
+        PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4339.pdf")).close();
     }
 
     private void executeParserTest(RandomAccessRead source, MemoryUsageSetting memUsageSetting) throws IOException

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdfwriter/COSWriterTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdfwriter/COSWriterTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdfwriter/COSWriterTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdfwriter/COSWriterTest.java Sat Oct  5 13:23:29 2019
@@ -19,6 +19,7 @@ package org.apache.pdfbox.pdfwriter;
 import java.io.BufferedOutputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+
 import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.junit.Test;

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestFDF.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestFDF.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestFDF.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestFDF.java Sat Oct  5 13:23:29 2019
@@ -25,6 +25,8 @@ import java.util.List;
 import junit.framework.TestCase;
 
 import org.apache.pdfbox.pdfparser.FDFParser;
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.fdf.FDFDocument;
 import org.apache.pdfbox.pdmodel.fdf.FDFField;
 import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm;
@@ -65,7 +67,8 @@ public class TestFDF extends TestCase
             assertEquals("Test1", fields.get(0).getValue());
             assertEquals("Test2", fields.get(1).getValue());
             
-            try (PDDocument pdf = PDDocument.load(new File(TestFDF.class.getResource("/org/apache/pdfbox/pdfparser/SimpleForm2Fields.pdf").toURI())))
+            try (PDDocument pdf = PDFParser.load(new File(TestFDF.class
+                    .getResource("/org/apache/pdfbox/pdfparser/SimpleForm2Fields.pdf").toURI())))
             {
                 PDAcroForm acroForm = pdf.getDocumentCatalog().getAcroForm();
                 acroForm.importFDF(fdf);

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocument.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocument.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocument.java Sat Oct  5 13:23:29 2019
@@ -29,6 +29,8 @@ import java.util.Arrays;
 import java.util.Locale;
 
 import org.apache.pdfbox.io.IOUtils;
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 
 import junit.framework.TestCase;
 
@@ -69,7 +71,7 @@ public class TestPDDocument extends Test
         assertEquals("%%EOF\n", new String(Arrays.copyOfRange(pdf, pdf.length - 6, pdf.length), "UTF-8"));
 
         // Load
-        PDDocument loadDoc = PDDocument.load(new ByteArrayInputStream(pdf));
+        PDDocument loadDoc = PDFParser.load(new ByteArrayInputStream(pdf));
         assertEquals(1, loadDoc.getNumberOfPages());
         loadDoc.close();
     }
@@ -99,7 +101,7 @@ public class TestPDDocument extends Test
         assertEquals("%%EOF\n", new String(Arrays.copyOfRange(pdf, pdf.length - 6, pdf.length), "UTF-8"));
 
         // Load
-        PDDocument loadDoc = PDDocument.load(targetFile);
+        PDDocument loadDoc = PDFParser.load(targetFile);
         assertEquals(1, loadDoc.getNumberOfPages());
         loadDoc.close();
     }
@@ -157,7 +159,7 @@ public class TestPDDocument extends Test
         PDDocument doc = null;
         try
         {
-            doc = PDDocument.load(f);
+            doc = PDFParser.load(f);
             fail("parsing should fail");
         }
         catch (IOException ex)
@@ -186,7 +188,7 @@ public class TestPDDocument extends Test
         doc.save(f);
         doc.close();
 
-        PDDocument.load(f).close();
+        PDFParser.load(f).close();
 
         boolean deleted = f.delete();
         assertTrue("delete good file failed after successful load() and close()", deleted);
@@ -209,7 +211,7 @@ public class TestPDDocument extends Test
         doc.save(baos);
         doc.close();
 
-        PDDocument.load(new ByteArrayInputStream(baos.toByteArray())).close();
+        PDFParser.load(new ByteArrayInputStream(baos.toByteArray())).close();
 
         Locale.setDefault(defaultLocale);
     }

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocumentCatalog.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocumentCatalog.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocumentCatalog.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocumentCatalog.java Sat Oct  5 13:23:29 2019
@@ -21,6 +21,8 @@ import java.io.InputStream;
 import java.util.List;
 
 import org.apache.pdfbox.cos.COSName;
+import org.apache.pdfbox.pdfparser.PDFParser;
+import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.pdmodel.graphics.color.PDOutputIntent;
 
 import static org.junit.Assert.assertEquals;
@@ -51,7 +53,8 @@ public class TestPDDocumentCatalog
         PDDocument doc = null;
         try
         {
-            doc = PDDocument.load(TestPDDocumentCatalog.class.getResourceAsStream("test_pagelabels.pdf"));
+            doc = PDFParser
+                    .load(TestPDDocumentCatalog.class.getResourceAsStream("test_pagelabels.pdf"));
             PDDocumentCatalog cat = doc.getDocumentCatalog();
             String[] labels = cat.getPageLabels().getLabelsByPageIndices();
             assertEquals(12, labels.length);
@@ -92,7 +95,8 @@ public class TestPDDocumentCatalog
         PDDocument doc = null;
         try
         {
-            doc = PDDocument.load(TestPDDocumentCatalog.class.getResourceAsStream("badpagelabels.pdf"));
+            doc = PDFParser
+                    .load(TestPDDocumentCatalog.class.getResourceAsStream("badpagelabels.pdf"));
             PDDocumentCatalog cat = doc.getDocumentCatalog();
             // getLabelsByPageIndices() should not throw an exception
             cat.getPageLabels().getLabelsByPageIndices();
@@ -122,7 +126,7 @@ public class TestPDDocumentCatalog
         PDDocument doc = null;
         try
         {
-            doc = PDDocument.load(TestPDDocumentCatalog.class.getResourceAsStream("test.unc.pdf"));
+            doc = PDFParser.load(TestPDDocumentCatalog.class.getResourceAsStream("test.unc.pdf"));
             assertEquals(4, doc.getNumberOfPages());
         }
         finally
@@ -151,7 +155,7 @@ public class TestPDDocumentCatalog
         try
         {
             
-            doc = PDDocument.load(TestPDDocumentCatalog.class.getResourceAsStream("test.unc.pdf"));
+            doc = PDFParser.load(TestPDDocumentCatalog.class.getResourceAsStream("test.unc.pdf"));
             PDDocumentCatalog catalog = doc.getDocumentCatalog();
 
             // retrieve OutputIntents

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocumentInformation.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocumentInformation.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocumentInformation.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocumentInformation.java Sat Oct  5 13:23:29 2019
@@ -20,6 +20,9 @@ import java.io.File;
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
+
 import junit.framework.TestCase;
 
 /**
@@ -33,7 +36,7 @@ public class TestPDDocumentInformation e
     public void testMetadataExtraction() throws Exception
     {
         // This document has been selected for this test as it contains custom metadata.
-        try (PDDocument doc = PDDocument.load( new File("src/test/resources/input/hello3.pdf")))
+        try (PDDocument doc = PDFParser.load(new File("src/test/resources/input/hello3.pdf")))
         {
            PDDocumentInformation info = doc.getDocumentInformation();
            
@@ -69,7 +72,8 @@ public class TestPDDocumentInformation e
      */
     public void testPDFBox3068() throws Exception
     {
-        try (PDDocument doc = PDDocument.load(TestPDDocumentInformation.class.getResourceAsStream("PDFBOX-3068.pdf")))
+        try (PDDocument doc = PDFParser
+                .load(TestPDDocumentInformation.class.getResourceAsStream("PDFBOX-3068.pdf")))
         {
             PDDocumentInformation documentInformation = doc.getDocumentInformation();
             assertEquals("Title", documentInformation.getTitle());

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageContentStream.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageContentStream.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageContentStream.java Sat Oct  5 13:23:29 2019
@@ -21,6 +21,7 @@ import java.util.List;
 import junit.framework.TestCase;
 import org.apache.pdfbox.contentstream.operator.Operator;
 import org.apache.pdfbox.cos.COSFloat;
+import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.pdfparser.PDFStreamParser;
 import org.apache.pdfbox.pdmodel.PDPageContentStream.AppendMode;
 

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageTransitions.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageTransitions.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageTransitions.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageTransitions.java Sat Oct  5 13:23:29 2019
@@ -24,6 +24,8 @@ import java.io.IOException;
 import java.net.URISyntaxException;
 
 import org.apache.pdfbox.cos.COSName;
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.interactive.pagenavigation.PDTransition;
 import org.apache.pdfbox.pdmodel.interactive.pagenavigation.PDTransitionDirection;
 import org.apache.pdfbox.pdmodel.interactive.pagenavigation.PDTransitionStyle;
@@ -39,7 +41,7 @@ public class TestPDPageTransitions
     @Test
     public void readTransitions() throws IOException, URISyntaxException
     {
-        try (PDDocument doc = PDDocument.load(new File(this.getClass().getResource(
+        try (PDDocument doc = PDFParser.load(new File(this.getClass().getResource(
                 "/org/apache/pdfbox/pdmodel/interactive/pagenavigation/transitions_test.pdf").toURI())))
         {
             PDTransition firstTransition = doc.getPages().get(0).getTransition();
@@ -68,7 +70,7 @@ public class TestPDPageTransitions
         }
         
         // read
-        try (PDDocument doc = PDDocument.load(baos.toByteArray()))
+        try (PDDocument doc = PDFParser.load(baos.toByteArray()))
         {
             PDPage page = doc.getPages().get(0);
             PDTransition loadedTransition = page.getTransition();

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageTree.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageTree.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageTree.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDPageTree.java Sat Oct  5 13:23:29 2019
@@ -20,6 +20,8 @@ import static org.junit.Assert.assertEqu
 
 import java.io.IOException;
 
+import org.apache.pdfbox.pdfparser.PDFParser;
+import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDDocumentOutline;
 import org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem;
 
@@ -46,7 +48,7 @@ public class TestPDPageTree
     @Test
     public void indexOfPageFromOutlineDestination() throws IOException
     {
-        doc = PDDocument.load(TestPDPageTree.class.getResourceAsStream("with_outline.pdf"));
+        doc = PDFParser.load(TestPDPageTree.class.getResourceAsStream("with_outline.pdf"));
         PDDocumentOutline outline = doc.getDocumentCatalog().getDocumentOutline();
         for (PDOutlineItem current : outline.children())
         {
@@ -60,7 +62,7 @@ public class TestPDPageTree
     @Test
     public void positiveSingleLevel() throws IOException
     {
-        doc = PDDocument.load(TestPDPageTree.class.getResourceAsStream("with_outline.pdf"));
+        doc = PDFParser.load(TestPDPageTree.class.getResourceAsStream("with_outline.pdf"));
         for (int i = 0; i < doc.getNumberOfPages(); i++)
         {
             assertEquals(i, doc.getPages().indexOf(doc.getPage(i)));
@@ -70,7 +72,8 @@ public class TestPDPageTree
     @Test
     public void positiveMultipleLevel() throws IOException
     {
-        doc = PDDocument.load(TestPDPageTree.class.getResourceAsStream("page_tree_multiple_levels.pdf"));
+        doc = PDFParser
+                .load(TestPDPageTree.class.getResourceAsStream("page_tree_multiple_levels.pdf"));
         for (int i = 0; i < doc.getNumberOfPages(); i++)
         {
             assertEquals(i, doc.getPages().indexOf(doc.getPage(i)));
@@ -80,7 +83,7 @@ public class TestPDPageTree
     @Test
     public void negative() throws IOException
     {
-        doc = PDDocument.load(TestPDPageTree.class.getResourceAsStream("with_outline.pdf"));
+        doc = PDFParser.load(TestPDPageTree.class.getResourceAsStream("with_outline.pdf"));
         assertEquals(-1, doc.getPages().indexOf(new PDPage()));
     }
 }

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/TestEmbeddedFiles.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/TestEmbeddedFiles.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/TestEmbeddedFiles.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/TestEmbeddedFiles.java Sat Oct  5 13:23:29 2019
@@ -21,6 +21,7 @@ import java.io.UnsupportedEncodingExcept
 import java.util.List;
 import java.util.Map;
 
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
 import org.apache.pdfbox.pdmodel.PDDocumentNameDictionary;
@@ -40,7 +41,8 @@ public class TestEmbeddedFiles extends T
         boolean ok = false;
         try
         {
-            PDDocument doc = PDDocument.load(TestEmbeddedFiles.class.getResourceAsStream(
+            PDDocument doc = PDFParser.load(TestEmbeddedFiles.class
+                    .getResourceAsStream(
                 "null_PDComplexFileSpecification.pdf"));
 
             PDDocumentCatalog catalog = doc.getDocumentCatalog();
@@ -77,7 +79,8 @@ public class TestEmbeddedFiles extends T
         PDEmbeddedFile dosFile = null;
         PDEmbeddedFile unixFile = null;
 
-        PDDocument doc = PDDocument.load(TestEmbeddedFiles.class
+        PDDocument doc = PDFParser.load(
+                TestEmbeddedFiles.class
                 .getResourceAsStream("testPDF_multiFormatEmbFiles.pdf"));
 
         PDDocumentCatalog catalog = doc.getDocumentCatalog();

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElementTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElementTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElementTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElementTest.java Sat Oct  5 13:23:29 2019
@@ -26,6 +26,7 @@ import org.apache.pdfbox.cos.COSDictiona
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSObject;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -46,7 +47,7 @@ public class PDStructureElementTest
     public void testPDFBox4197() throws IOException
     {
         Set<Revisions<PDAttributeObject>> attributeSet = new HashSet<>();
-        try (PDDocument doc = PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4197.pdf")))
+        try (PDDocument doc = PDFParser.load(new File(TARGETPDFDIR, "PDFBOX-4197.pdf")))
         {
             PDStructureTreeRoot structureTreeRoot = doc.getDocumentCatalog().getStructureTreeRoot();
             checkElement(structureTreeRoot.getK(), attributeSet);

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/PDFontTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/PDFontTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/PDFontTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/PDFontTest.java Sat Oct  5 13:23:29 2019
@@ -27,6 +27,7 @@ import org.apache.fontbox.ttf.TTFParser;
 import org.apache.fontbox.ttf.TrueTypeFont;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.PDPageContentStream;
 import org.apache.pdfbox.pdmodel.font.encoding.WinAnsiEncoding;
@@ -61,7 +62,7 @@ public class PDFontTest
     public void testPDFBox988() throws IOException, URISyntaxException
     {
         try (PDDocument doc = 
-                PDDocument.load(new File(PDFontTest.class.getResource("F001u_3_7j.pdf").toURI())))
+                PDFParser.load(new File(PDFontTest.class.getResource("F001u_3_7j.pdf").toURI())))
         {
             PDFRenderer renderer = new PDFRenderer(doc);
             renderer.renderImage(0);
@@ -101,7 +102,7 @@ public class PDFontTest
             doc.save(baos);
         }
 
-        try (PDDocument doc = PDDocument.load(baos.toByteArray()))
+        try (PDDocument doc = PDFParser.load(baos.toByteArray()))
         {
             PDFTextStripper stripper = new PDFTextStripper();
             String text = stripper.getText(doc);
@@ -166,7 +167,7 @@ public class PDFontTest
 
             doc.save(outputFile);
         }
-        try (PDDocument doc = PDDocument.load(outputFile))
+        try (PDDocument doc = PDFParser.load(outputFile))
         {
             PDType1Font font = (PDType1Font) doc.getPage(0).getResources().getFont(COSName.getPDFName("F1"));
             Assert.assertEquals(font.getEncoding(), WinAnsiEncoding.INSTANCE);
@@ -211,7 +212,7 @@ public class PDFontTest
 
     private void testPDFBox3826checkFonts(byte[] byteArray, File fontFile) throws IOException
     {
-        try (PDDocument doc = PDDocument.load(byteArray))
+        try (PDDocument doc = PDFParser.load(byteArray))
         {
             PDPage page2 = doc.getPage(0);
             

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java Sat Oct  5 13:23:29 2019
@@ -27,6 +27,7 @@ import org.apache.pdfbox.cos.COSArray;
 import org.apache.pdfbox.cos.COSDictionary;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.common.PDRectangle;
 import org.apache.pdfbox.pdmodel.PDPageContentStream;
@@ -295,7 +296,7 @@ public class TestFontEmbedding extends T
 
     private String getUnicodeText(File file) throws IOException
     {
-        PDDocument document = PDDocument.load(file);
+        PDDocument document = PDFParser.load(file);
         PDFTextStripper stripper = new PDFTextStripper();
         return stripper.getText(document);
     }

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEncoding.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEncoding.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEncoding.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEncoding.java Sat Oct  5 13:23:29 2019
@@ -27,6 +27,7 @@ import org.apache.pdfbox.cos.COSDictiona
 import org.apache.pdfbox.cos.COSInteger;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.PDPageContentStream;
 import org.apache.pdfbox.pdmodel.font.encoding.DictionaryEncoding;
@@ -93,7 +94,7 @@ public class TestFontEncoding extends Te
         doc.close();
 
         // verify
-        doc = PDDocument.load(baos.toByteArray());
+        doc = PDFParser.load(baos.toByteArray());
         PDFTextStripper stripper = new PDFTextStripper();
         String text = stripper.getText(doc);
         assertEquals("~˜", text.trim());

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/color/PDICCBasedTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/color/PDICCBasedTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/color/PDICCBasedTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/color/PDICCBasedTest.java Sat Oct  5 13:23:29 2019
@@ -15,9 +15,10 @@
  */
 package org.apache.pdfbox.pdmodel.graphics.color;
 
-import org.apache.pdfbox.pdmodel.PDDocument;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+
+import org.apache.pdfbox.pdmodel.PDDocument;
 import org.junit.Test;
 
 /**

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/CCITTFactoryTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/CCITTFactoryTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/CCITTFactoryTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/CCITTFactoryTest.java Sat Oct  5 13:23:29 2019
@@ -25,7 +25,9 @@ import javax.imageio.ImageIO;
 import javax.imageio.ImageReader;
 import javax.imageio.stream.ImageInputStream;
 import junit.framework.TestCase;
+
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.common.PDRectangle;
 import org.apache.pdfbox.pdmodel.PDPageContentStream;
@@ -84,7 +86,7 @@ public class CCITTFactoryTest extends Te
         document.save(testResultsDir + "/singletiff.pdf");
         document.close();
         
-        document = PDDocument.load(new File(testResultsDir, "singletiff.pdf"));
+        document = PDFParser.load(new File(testResultsDir, "singletiff.pdf"));
         assertEquals(2, document.getNumberOfPages());
         
         document.close();  
@@ -133,7 +135,7 @@ public class CCITTFactoryTest extends Te
         document.save(testResultsDir + "/multitiff.pdf");
         document.close();
         
-        document = PDDocument.load(new File(testResultsDir, "multitiff.pdf"), (String)null);
+        document = PDFParser.load(new File(testResultsDir, "multitiff.pdf"), (String) null);
         assertEquals(countTiffImages, document.getNumberOfPages());
         
         document.close();  
@@ -159,7 +161,7 @@ public class CCITTFactoryTest extends Te
         document.save(testResultsDir + "/singletifffrombi.pdf");
         document.close();
         
-        document = PDDocument.load(new File(testResultsDir, "singletifffrombi.pdf"));
+        document = PDFParser.load(new File(testResultsDir, "singletifffrombi.pdf"));
         assertEquals(1, document.getNumberOfPages());
         
         document.close();  
@@ -193,7 +195,7 @@ public class CCITTFactoryTest extends Te
         document.save(testResultsDir + "/singletifffromchessbi.pdf");
         document.close();
 
-        document = PDDocument.load(new File(testResultsDir, "singletifffromchessbi.pdf"));
+        document = PDFParser.load(new File(testResultsDir, "singletifffromchessbi.pdf"));
         assertEquals(1, document.getNumberOfPages());
 
         document.close();

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/JPEGFactoryTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/JPEGFactoryTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/JPEGFactoryTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/JPEGFactoryTest.java Sat Oct  5 13:23:29 2019
@@ -27,6 +27,7 @@ import junit.framework.TestCase;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.io.IOUtils;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceCMYK;
 import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray;
 import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB;
@@ -220,7 +221,7 @@ public class JPEGFactoryTest extends Tes
     private void checkJpegStream(File testResultsDir, String filename, InputStream resourceStream)
             throws IOException
     {
-        PDDocument doc = PDDocument.load(new File(testResultsDir, filename));
+        PDDocument doc = PDFParser.load(new File(testResultsDir, filename));
         PDImageXObject img =
                 (PDImageXObject) doc.getPage(0).getResources().getXObject(COSName.getPDFName("Im1"));
         InputStream dctStream = img.createInputStream(Arrays.asList(COSName.DCT_DECODE.getName()));

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactoryTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactoryTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactoryTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactoryTest.java Sat Oct  5 13:23:29 2019
@@ -37,15 +37,12 @@ import java.util.Hashtable;
 import java.util.Random;
 import javax.imageio.ImageIO;
 import junit.framework.TestCase;
-import static junit.framework.TestCase.assertEquals;
-import static junit.framework.TestCase.assertFalse;
-import static junit.framework.TestCase.assertNotNull;
-import static junit.framework.TestCase.assertTrue;
+
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.PDPageContentStream;
 import org.apache.pdfbox.pdmodel.PDPageContentStream.AppendMode;
-import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceCMYK;
 import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray;
 import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB;
 import static org.apache.pdfbox.pdmodel.graphics.image.ValidateXImage.checkIdent;
@@ -122,7 +119,7 @@ public class LosslessFactoryTest extends
         document.save(pdfFile);
         document.close();
         
-        document = PDDocument.load(pdfFile, (String)null);
+        document = PDFParser.load(pdfFile, (String) null);
         new PDFRenderer(document).renderImage(0);
         document.close();
     }
@@ -412,7 +409,7 @@ public class LosslessFactoryTest extends
         File pdfFile = new File(testResultsDir, pdfFilename);
         document.save(pdfFile);
         document.close();
-        document = PDDocument.load(pdfFile, (String)null);
+        document = PDFParser.load(pdfFile, (String) null);
         new PDFRenderer(document).renderImage(0);
         document.close();
     }
@@ -450,7 +447,8 @@ public class LosslessFactoryTest extends
                 ColorModel.OPAQUE, dataBufferType);
         WritableRaster targetRaster = Raster.createInterleavedRaster(dataBufferType, image.getWidth(), image.getHeight(),
                 targetCS.getNumComponents(), new Point(0, 0));
-        BufferedImage img16Bit = new BufferedImage(colorModel, targetRaster, false, new Hashtable());
+        BufferedImage img16Bit = new BufferedImage(colorModel, targetRaster, false,
+                new Hashtable<>());
         ColorConvertOp op = new ColorConvertOp(image.getColorModel().getColorSpace(), targetCS, null);
         op.filter(image, img16Bit);
 

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/PDInlineImageTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/PDInlineImageTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/PDInlineImageTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/PDInlineImageTest.java Sat Oct  5 13:23:29 2019
@@ -28,6 +28,7 @@ import org.apache.pdfbox.cos.COSDictiona
 import org.apache.pdfbox.cos.COSInteger;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.PDPageContentStream;
 import org.apache.pdfbox.pdmodel.PDPageContentStream.AppendMode;
@@ -178,7 +179,7 @@ public class PDInlineImageTest extends T
         document.save(pdfFile);
         document.close();
 
-        document = PDDocument.load(pdfFile);
+        document = PDFParser.load(pdfFile);
         new PDFRenderer(document).renderImage(0);
         document.close();
 

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/ValidateXImage.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/ValidateXImage.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/ValidateXImage.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/ValidateXImage.java Sat Oct  5 13:23:29 2019
@@ -20,6 +20,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.Set;
 import javax.imageio.ImageIO;
 import javax.imageio.ImageWriter;
@@ -27,6 +28,7 @@ import javax.imageio.spi.ImageWriterSpi;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSStream;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.PDPageContentStream;
 import org.apache.pdfbox.rendering.PDFRenderer;
@@ -130,7 +132,7 @@ public class ValidateXImage
         document.save(pdfFile);
         document.close();
 
-        document = PDDocument.load(pdfFile);
+        document = PDFParser.load(pdfFile);
         assertEquals(1, count(document.getPage(0).getResources().getXObjectNames()));
         new PDFRenderer(document).renderImage(0);
         document.close();

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/TestOptionalContentGroups.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/TestOptionalContentGroups.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/TestOptionalContentGroups.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/TestOptionalContentGroups.java Sat Oct  5 13:23:29 2019
@@ -31,6 +31,7 @@ import junit.framework.TestCase;
 
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.PDResources;
@@ -162,7 +163,7 @@ public class TestOptionalContentGroups e
             testOCGGeneration();
         }
 
-        PDDocument doc = PDDocument.load(pdfFile);
+        PDDocument doc = PDFParser.load(pdfFile);
         try
         {
             assertEquals(1.5f, doc.getVersion());
@@ -417,7 +418,8 @@ public class TestOptionalContentGroups e
         }
 
         // render PDF with science disabled and alternatives with same name enabled
-        try (PDDocument doc = PDDocument.load(new File(testResultsDir, "ocg-generation-same-name-off.pdf")))
+        try (PDDocument doc = PDFParser
+                .load(new File(testResultsDir, "ocg-generation-same-name-off.pdf")))
         {
             doc.getDocumentCatalog().getOCProperties().setGroupEnabled("background", false);
             doc.getDocumentCatalog().getOCProperties().setGroupEnabled("science", false);

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/annotation/AppearanceGenerationTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/annotation/AppearanceGenerationTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/annotation/AppearanceGenerationTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/annotation/AppearanceGenerationTest.java Sat Oct  5 13:23:29 2019
@@ -27,8 +27,9 @@ import java.util.List;
 import org.apache.pdfbox.contentstream.operator.Operator;
 import org.apache.pdfbox.cos.COSFloat;
 import org.apache.pdfbox.cos.COSName;
-import org.apache.pdfbox.pdfparser.PDFStreamParser;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
+import org.apache.pdfbox.pdfparser.PDFStreamParser;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.common.PDRectangle;
 import org.apache.pdfbox.rendering.TestPDFToImage;
@@ -73,7 +74,7 @@ public class AppearanceGenerationTest
     @Before
     public void setUp() throws IOException
     {
-        document = PDDocument.load(new File(IN_DIR, NAME_OF_PDF));
+        document = PDFParser.load(new File(IN_DIR, NAME_OF_PDF));
         OUT_DIR.mkdirs();
     }
     

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDSquareAnnotationTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDSquareAnnotationTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDSquareAnnotationTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDSquareAnnotationTest.java Sat Oct  5 13:23:29 2019
@@ -20,8 +20,9 @@ import org.apache.pdfbox.contentstream.o
 import org.apache.pdfbox.cos.COSFloat;
 import org.apache.pdfbox.cos.COSInteger;
 import org.apache.pdfbox.cos.COSName;
-import org.apache.pdfbox.pdfparser.PDFStreamParser;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
+import org.apache.pdfbox.pdfparser.PDFStreamParser;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.common.PDRectangle;
 import org.apache.pdfbox.pdmodel.common.PDStream;
@@ -110,7 +111,7 @@ public class PDSquareAnnotationTest
         final int borderWidth = 1;
 
         File file = new File(IN_DIR, NAME_OF_PDF);
-        try (PDDocument document = PDDocument.load(file))
+        try (PDDocument document = PDFParser.load(file))
         {
             PDPage page = document.getPage(0);
             List<PDAnnotation> annotations = page.getAnnotations();

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/AcroFormsRotationTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/AcroFormsRotationTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/AcroFormsRotationTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/AcroFormsRotationTest.java Sat Oct  5 13:23:29 2019
@@ -21,6 +21,7 @@ import java.io.File;
 import java.io.IOException;
 
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.rendering.TestPDFToImage;
 import org.junit.After;
 import org.junit.Before;
@@ -41,7 +42,7 @@ public class AcroFormsRotationTest
     @Before
     public void setUp() throws IOException
     {
-        document = PDDocument.load(new File(IN_DIR, NAME_OF_PDF));
+        document = PDFParser.load(new File(IN_DIR, NAME_OF_PDF));
         acroForm = document.getDocumentCatalog().getAcroForm();
         OUT_DIR.mkdirs();
     }

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/AlignmentTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/AlignmentTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/AlignmentTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/AlignmentTest.java Sat Oct  5 13:23:29 2019
@@ -20,6 +20,7 @@ import java.io.File;
 import java.io.IOException;
 
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.rendering.TestPDFToImage;
 import org.junit.After;
 import org.junit.Before;
@@ -39,7 +40,7 @@ public class AlignmentTest
     @Before
     public void setUp() throws IOException
     {
-        document = PDDocument.load(new File(IN_DIR, NAME_OF_PDF));
+        document = PDFParser.load(new File(IN_DIR, NAME_OF_PDF));
         acroForm = document.getDocumentCatalog().getAcroForm();
         OUT_DIR.mkdirs();
     }

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/ControlCharacterTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/ControlCharacterTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/ControlCharacterTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/ControlCharacterTest.java Sat Oct  5 13:23:29 2019
@@ -24,8 +24,9 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.pdfbox.cos.COSString;
-import org.apache.pdfbox.pdfparser.PDFStreamParser;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
+import org.apache.pdfbox.pdfparser.PDFStreamParser;
 import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget;
 import org.junit.After;
 import org.junit.Before;
@@ -66,7 +67,7 @@ public class ControlCharacterTest {
     @Before
     public void setUp() throws IOException
     {
-        document = PDDocument.load(new File(IN_DIR, NAME_OF_PDF));
+        document = PDFParser.load(new File(IN_DIR, NAME_OF_PDF));
         acroForm = document.getDocumentCatalog().getAcroForm();
     }
     

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/HandleDifferentDALevelsTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/HandleDifferentDALevelsTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/HandleDifferentDALevelsTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/HandleDifferentDALevelsTest.java Sat Oct  5 13:23:29 2019
@@ -24,6 +24,7 @@ import java.util.List;
 
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget;
 import org.junit.After;
 import org.junit.Before;
@@ -41,7 +42,7 @@ public class HandleDifferentDALevelsTest
     @Before
     public void setUp() throws IOException
     {
-        document = PDDocument.load(new File(IN_DIR, NAME_OF_PDF));
+        document = PDFParser.load(new File(IN_DIR, NAME_OF_PDF));
         acroForm = document.getDocumentCatalog().getAcroForm();
         OUT_DIR.mkdirs();
         

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/MultilineFieldsTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/MultilineFieldsTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/MultilineFieldsTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/MultilineFieldsTest.java Sat Oct  5 13:23:29 2019
@@ -19,7 +19,9 @@ package org.apache.pdfbox.pdmodel.intera
 
 import java.io.File;
 import java.io.IOException;
+
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.rendering.TestPDFToImage;
 import org.junit.After;
 import org.junit.Before;
@@ -40,7 +42,7 @@ public class MultilineFieldsTest
     @Before
     public void setUp() throws IOException
     {
-        document = PDDocument.load(new File(IN_DIR, NAME_OF_PDF));
+        document = PDFParser.load(new File(IN_DIR, NAME_OF_PDF));
         acroForm = document.getDocumentCatalog().getAcroForm();
         OUT_DIR.mkdirs();
     }

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormFlattenTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormFlattenTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormFlattenTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormFlattenTest.java Sat Oct  5 13:23:29 2019
@@ -30,6 +30,7 @@ import java.net.URL;
 import javax.imageio.ImageIO;
 
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.rendering.PDFRenderer;
 import org.apache.pdfbox.rendering.TestPDFToImage;
 import org.junit.Before;
@@ -257,7 +258,7 @@ public class PDAcroFormFlattenTest {
         File inputFile = new File(IN_DIR, targetFileName);
         File outputFile = new File(OUT_DIR, targetFileName);
 
-        try (PDDocument testPdf = PDDocument.load(inputFile))
+        try (PDDocument testPdf = PDFParser.load(inputFile))
         {
             testPdf.getDocumentCatalog().getAcroForm().flatten();
             testPdf.setAllSecurityToBeRemoved(true);
@@ -294,7 +295,7 @@ public class PDAcroFormFlattenTest {
 
         File file = new File(IN_DIR,targetFile);
 
-        try (PDDocument document = PDDocument.load(file, (String)null))
+        try (PDDocument document = PDFParser.load(file, (String) null))
         {
             String outputPrefix = IN_DIR.getAbsolutePath() + '/' + file.getName() + "-";
             int numPages = document.getNumberOfPages();

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormTest.java Sat Oct  5 13:23:29 2019
@@ -32,6 +32,7 @@ import java.util.List;
 import org.apache.pdfbox.cos.COSDictionary;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.PDResources;
@@ -101,7 +102,7 @@ public class PDAcroFormTest
     public void testFlatten() throws IOException
     {
         File file = new File(OUT_DIR, "AlignmentTests-flattened.pdf");
-        try (PDDocument testPdf = PDDocument.load(new File(IN_DIR, "AlignmentTests.pdf")))
+        try (PDDocument testPdf = PDFParser.load(new File(IN_DIR, "AlignmentTests.pdf")))
         {
             testPdf.getDocumentCatalog().getAcroForm().flatten();
             assertTrue(testPdf.getDocumentCatalog().getAcroForm().getFields().isEmpty());
@@ -127,7 +128,7 @@ public class PDAcroFormTest
     {
         File file = new File(OUT_DIR, "AlignmentTests-flattened-noRef.pdf");
 
-        try (PDDocument testPdf = PDDocument.load(new File(IN_DIR, "AlignmentTests.pdf")))
+        try (PDDocument testPdf = PDFParser.load(new File(IN_DIR, "AlignmentTests.pdf")))
         {
             PDAcroForm acroFormToTest = testPdf.getDocumentCatalog().getAcroForm();
             for (PDField field : acroFormToTest.getFieldTree()) {
@@ -159,7 +160,7 @@ public class PDAcroFormTest
         
         List<PDField> fieldsToFlatten = new ArrayList<>();
                 
-        try (PDDocument testPdf = PDDocument.load(new File(IN_DIR, "AlignmentTests.pdf")))
+        try (PDDocument testPdf = PDFParser.load(new File(IN_DIR, "AlignmentTests.pdf")))
         {
             PDAcroForm acroFormToFlatten = testPdf.getDocumentCatalog().getAcroForm();
             int numFieldsBeforeFlatten = acroFormToFlatten.getFields().size();
@@ -193,7 +194,7 @@ public class PDAcroFormTest
         {
             byte[] pdfBytes =  createAcroFormWithMissingResourceInformation();
             
-            try (PDDocument pdfDocument = PDDocument.load(pdfBytes))
+            try (PDDocument pdfDocument = PDFParser.load(pdfBytes))
             {
                 // do a low level access to the AcroForm to avoid the generation of missing entries
                 PDDocumentCatalog documentCatalog = pdfDocument.getDocumentCatalog();
@@ -227,7 +228,7 @@ public class PDAcroFormTest
         {
             byte[] pdfBytes =  createAcroFormWithMissingResourceInformation();
 
-            try (PDDocument pdfDocument = PDDocument.load(pdfBytes))
+            try (PDDocument pdfDocument = PDFParser.load(pdfBytes))
             {
                 PDDocumentCatalog documentCatalog = pdfDocument.getDocumentCatalog();
                 
@@ -335,7 +336,7 @@ public class PDAcroFormTest
             assertNotNull(zadb);
             doc.save(baos);
         }
-        try (PDDocument doc = PDDocument.load(baos.toByteArray()))
+        try (PDDocument doc = PDFParser.load(baos.toByteArray()))
         {
             PDAcroForm acroForm2 = doc.getDocumentCatalog().getAcroForm();
             PDResources defaultResources = acroForm2.getDefaultResources();

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDButtonTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDButtonTest.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDButtonTest.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDButtonTest.java Sat Oct  5 13:23:29 2019
@@ -30,6 +30,7 @@ import java.net.MalformedURLException;
 
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget;
 
 import org.junit.After;
@@ -62,7 +63,7 @@ public class PDButtonTest
         document = new PDDocument();
         acroForm = new PDAcroForm(document);
         
-        acrobatDocument = PDDocument.load(new File(IN_DIR, NAME_OF_PDF));
+        acrobatDocument = PDFParser.load(new File(IN_DIR, NAME_OF_PDF));
         acrobatAcroForm = acrobatDocument.getDocumentCatalog().getAcroForm();
     }
 
@@ -114,7 +115,7 @@ public class PDButtonTest
         File file = new File(TARGET_PDF_DIR, "PDFBOX-3656.pdf");
         
         try (InputStream is = new FileInputStream(file);
-             PDDocument pdfDocument = PDDocument.load(is))
+                PDDocument pdfDocument = PDFParser.load(is))
         {   
             PDRadioButton radioButton = (PDRadioButton) pdfDocument.getDocumentCatalog().getAcroForm().getField("Checking/Savings");
             radioButton.setValue("Off");
@@ -144,7 +145,7 @@ public class PDButtonTest
     {
         File file = new File(TARGET_PDF_DIR, "PDFBOX-3682.pdf");
         try (InputStream is = new FileInputStream(file);
-                PDDocument pdfDocument = PDDocument.load(is))
+                PDDocument pdfDocument = PDFParser.load(is))
         {            
             pdfDocument.getDocumentCatalog().getAcroForm().getField("RadioButton").setValue("c");
             PDRadioButton radioButton = (PDRadioButton) pdfDocument.getDocumentCatalog().getAcroForm().getField("RadioButton");

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestCheckBox.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestCheckBox.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestCheckBox.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestCheckBox.java Sat Oct  5 13:23:29 2019
@@ -152,4 +152,4 @@ public class TestCheckBox extends TestCa
             assertEquals("Off", checkBox.getValue());
         }
     }
-}
\ No newline at end of file
+}

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java Sat Oct  5 13:23:29 2019
@@ -24,6 +24,7 @@ import junit.framework.TestSuite;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSString;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget;
 
 /**
@@ -123,7 +124,7 @@ public class TestFields extends TestCase
      */
     public void testAcroFormsBasicFields() throws IOException
     {       
-        try (PDDocument doc = PDDocument.load(new File(PATH_OF_PDF)))
+        try (PDDocument doc = PDFParser.load(new File(PATH_OF_PDF)))
         {            
             // get and assert that there is a form
             PDAcroForm form = doc.getDocumentCatalog().getAcroForm();
@@ -182,7 +183,7 @@ public class TestFields extends TestCase
      */
     public void testWidgetMissingRect() throws IOException
     {        
-        try (PDDocument doc = PDDocument.load(new File(PATH_OF_PDF)))
+        try (PDDocument doc = PDFParser.load(new File(PATH_OF_PDF)))
         {            
             PDAcroForm form = doc.getDocumentCatalog().getAcroForm();
             
@@ -200,4 +201,4 @@ public class TestFields extends TestCase
              
         }
     }
-}
\ No newline at end of file
+}

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestListBox.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestListBox.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestListBox.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestListBox.java Sat Oct  5 13:23:29 2019
@@ -258,4 +258,4 @@ public class TestListBox extends TestCas
             }
         }
     }
-}
\ No newline at end of file
+}

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestRadioButtons.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestRadioButtons.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestRadioButtons.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestRadioButtons.java Sat Oct  5 13:23:29 2019
@@ -109,4 +109,4 @@ public class TestRadioButtons extends Te
             assertEquals(radioButton.getExportValues(), new ArrayList<String>());
         }
     }
-}
\ No newline at end of file
+}

Modified: pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/rendering/TestPDFToImage.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/rendering/TestPDFToImage.java?rev=1868015&r1=1868014&r2=1868015&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/rendering/TestPDFToImage.java (original)
+++ pdfbox/branches/issue4569/pdfbox/src/test/java/org/apache/pdfbox/rendering/TestPDFToImage.java Sat Oct  5 13:23:29 2019
@@ -32,6 +32,8 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.pdfbox.ParallelParameterized;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
+
 import static org.junit.Assert.fail;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -224,7 +226,7 @@ public class TestPDFToImage
         try
         {
             new FileOutputStream(new File(outDir, file.getName() + ".parseerror")).close();
-            document = PDDocument.load(file, (String)null);
+            document = PDFParser.load(file, (String) null);
             String outputPrefix = outDir + '/' + file.getName() + "-";
             int numPages = document.getNumberOfPages();
             if (numPages < 1)
@@ -258,7 +260,7 @@ public class TestPDFToImage
             document.save(tmpFile);
             new File(outDir, file.getName() + ".saveerror").delete();
             new FileOutputStream(new File(outDir, file.getName() + ".reloaderror")).close();
-            PDDocument.load(tmpFile, (String)null).close();
+            PDFParser.load(tmpFile, (String) null).close();
             new File(outDir, file.getName() + ".reloaderror").delete();
             tmpFile.delete();
         }



Mime
View raw message