pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1868020 - in /pdfbox/branches/issue4569/tools/src: main/java/org/apache/pdfbox/tools/ test/java/org/apache/pdfbox/tools/ test/java/org/apache/pdfbox/tools/imageio/
Date Sat, 05 Oct 2019 13:57:05 GMT
Author: lehmi
Date: Sat Oct  5 13:57:05 2019
New Revision: 1868020

URL: http://svn.apache.org/viewvc?rev=1868020&view=rev
Log:
PDFBOX-4569: moved load methods to parser

Modified:
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/DecompressObjectstreams.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/Decrypt.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/Encrypt.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExportFDF.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExportXFDF.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExtractImages.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImageToPDF.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImportXFDF.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PDFSplit.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PDFToImage.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java
    pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java
    pdfbox/branches/issue4569/tools/src/test/java/org/apache/pdfbox/tools/TestTextToPdf.java
    pdfbox/branches/issue4569/tools/src/test/java/org/apache/pdfbox/tools/imageio/TestImageIOUtils.java

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/DecompressObjectstreams.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/DecompressObjectstreams.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/DecompressObjectstreams.java
(original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/DecompressObjectstreams.java
Sat Oct  5 13:57:05 2019
@@ -20,8 +20,9 @@ import java.io.File;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSObject;
 import org.apache.pdfbox.cos.COSStream;
-import org.apache.pdfbox.pdfparser.PDFObjectStreamParser;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFObjectStreamParser;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.cos.COSObjectKey;
 import org.apache.pdfbox.io.IOUtils;
 
@@ -79,7 +80,7 @@ public final class DecompressObjectstrea
         PDDocument doc = null;
         try
         {
-            doc = PDDocument.load(new File(inputFilename));
+            doc = PDFParser.load(new File(inputFilename));
             for(COSObject objStream : doc.getDocument().getObjectsByType(COSName.OBJ_STM))
             {
                 COSStream stream = (COSStream)objStream.getObject();

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/Decrypt.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/Decrypt.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/Decrypt.java (original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/Decrypt.java Sat
Oct  5 13:57:05 2019
@@ -31,6 +31,7 @@ import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
 import org.apache.pdfbox.io.IOUtils;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.encryption.AccessPermission;
 
 /**
@@ -151,7 +152,7 @@ public final class Decrypt
             {
                 keyStoreStream = new FileInputStream(keyStore);
             }
-            document = PDDocument.load(new File(infile), password, keyStoreStream, alias);
+            document = PDFParser.load(new File(infile), password, keyStoreStream, alias);
             
             if (document.isEncrypted())
             {

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/Encrypt.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/Encrypt.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/Encrypt.java (original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/Encrypt.java Sat
Oct  5 13:57:05 2019
@@ -25,6 +25,7 @@ import java.security.cert.CertificateFac
 import java.security.cert.X509Certificate;
 
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.encryption.AccessPermission;
 import org.apache.pdfbox.pdmodel.encryption.PublicKeyProtectionPolicy;
 import org.apache.pdfbox.pdmodel.encryption.PublicKeyRecipient;
@@ -163,7 +164,7 @@ public final class Encrypt
                 {
                     outfile = infile;
                 }
-                document = PDDocument.load( new File(infile) );
+                document = PDFParser.load(new File(infile));
 
                 if( !document.isEncrypted() )
                 {

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExportFDF.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExportFDF.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExportFDF.java (original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExportFDF.java Sat
Oct  5 13:57:05 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.pdmodel.interactive.form.PDAcroForm;
 import org.apache.pdfbox.pdmodel.fdf.FDFDocument;
 
@@ -64,7 +65,7 @@ public class ExportFDF
         }
         else
         {
-            try (PDDocument pdf = PDDocument.load( new File(args[0]) ))
+            try (PDDocument pdf = PDFParser.load(new File(args[0])))
             {
                 PDAcroForm form = pdf.getDocumentCatalog().getAcroForm();
                 if( form == null )

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExportXFDF.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExportXFDF.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExportXFDF.java
(original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExportXFDF.java
Sat Oct  5 13:57:05 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.pdmodel.interactive.form.PDAcroForm;
 import org.apache.pdfbox.pdmodel.fdf.FDFDocument;
 
@@ -65,7 +66,7 @@ public class ExportXFDF
         }
         else
         {
-            try (PDDocument pdf = PDDocument.load( new File(args[0]) ))
+            try (PDDocument pdf = PDFParser.load(new File(args[0])))
             {
                 PDAcroForm form = pdf.getDocumentCatalog().getAcroForm();
                 if( form == null )

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExtractImages.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExtractImages.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExtractImages.java
(original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExtractImages.java
Sat Oct  5 13:57:05 2019
@@ -31,6 +31,7 @@ import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSStream;
 import org.apache.pdfbox.io.IOUtils;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.PDResources;
 import org.apache.pdfbox.pdmodel.encryption.AccessPermission;
@@ -168,7 +169,7 @@ public final class ExtractImages
 
     private void extract(String pdfFile, String password) throws IOException
     {
-        try (PDDocument document = PDDocument.load(new File(pdfFile), password))
+        try (PDDocument document = PDFParser.load(new File(pdfFile), password))
         {
             AccessPermission ap = document.getCurrentAccessPermission();
             if (!ap.canExtractContent())

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java
(original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java
Sat Oct  5 13:57:05 2019
@@ -31,6 +31,7 @@ import org.apache.pdfbox.cos.COSArray;
 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.PDDocumentCatalog;
 import org.apache.pdfbox.pdmodel.PDDocumentNameDictionary;
 import org.apache.pdfbox.pdmodel.PDEmbeddedFilesNameTreeNode;
@@ -215,7 +216,7 @@ public final class ExtractText
                 {
                     outputFile = new File( pdfFile.substring( 0, pdfFile.length() -4 ) +
ext ).getAbsolutePath();
                 }
-                document = PDDocument.load(new File( pdfFile ), password);
+                document = PDFParser.load(new File(pdfFile), password);
                 
                 AccessPermission ap = document.getCurrentAccessPermission();
                 if( ! ap.canExtractContent() )
@@ -301,7 +302,7 @@ public final class ExtractText
                                         System.err.println("  is PDF (size=" + file.getSize()
+ ")");
                                     }
                                     try (InputStream fis = file.createInputStream();
-                                        PDDocument subDoc = PDDocument.load(fis))
+                                            PDDocument subDoc = PDFParser.load(fis))
                                     {
                                         if (toHTML)
                                         {

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImageToPDF.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImageToPDF.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImageToPDF.java
(original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImageToPDF.java
Sat Oct  5 13:57:05 2019
@@ -19,6 +19,7 @@ package org.apache.pdfbox.tools;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+
 import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.apache.pdfbox.pdmodel.PDPageContentStream;

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java (original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java Sat
Oct  5 13:57:05 2019
@@ -19,7 +19,9 @@ package org.apache.pdfbox.tools;
 import java.io.File;
 import java.io.IOException;
 
+import org.apache.pdfbox.pdfparser.FDFParser;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
 import org.apache.pdfbox.pdmodel.fdf.FDFDocument;
 import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm;
@@ -91,8 +93,8 @@ public class ImportFDF
         {
             ImportFDF importer = new ImportFDF();
 
-            try (PDDocument pdf = PDDocument.load( new File(args[0]) );
-                    FDFDocument fdf = FDFDocument.load( args[1] ))
+            try (PDDocument pdf = PDFParser.load(new File(args[0]));
+                    FDFDocument fdf = FDFParser.load(args[1]))
             {
                 importer.importFDF( pdf, fdf );
 

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImportXFDF.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImportXFDF.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImportXFDF.java
(original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/ImportXFDF.java
Sat Oct  5 13:57:05 2019
@@ -16,7 +16,9 @@
  */
 package org.apache.pdfbox.tools;
 
+import org.apache.pdfbox.pdfparser.FDFParser;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
 import org.apache.pdfbox.pdmodel.fdf.FDFDocument;
 import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm;
@@ -84,8 +86,8 @@ public class ImportXFDF
         else
         {
             ImportFDF importer = new ImportFDF();
-            try (PDDocument pdf = PDDocument.load( new File(args[0]) );
-                    FDFDocument fdf = FDFDocument.loadXFDF( args[1] ))
+            try (PDDocument pdf = PDFParser.load(new File(args[0]));
+                    FDFDocument fdf = FDFParser.loadXFDF(args[1]))
             {
                 importer.importFDF( pdf, fdf );
                 pdf.save( args[2] );

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PDFSplit.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PDFSplit.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PDFSplit.java (original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PDFSplit.java Sat
Oct  5 13:57:05 2019
@@ -21,8 +21,9 @@ import java.io.IOException;
 
 import java.util.List;
 
-import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.multipdf.Splitter;
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 
 /**
  * This is the main program that will take a pdf document and split it into
@@ -131,7 +132,7 @@ public final class PDFSplit
             List<PDDocument> documents = null;
             try
             {
-                document = PDDocument.load(new File(pdfFile), password);
+                document = PDFParser.load(new File(pdfFile), password);
 
                 int numberOfPages = document.getNumberOfPages();
                 boolean startEndPageSet = false;
@@ -207,4 +208,4 @@ public final class PDFSplit
         System.err.println(message);
         System.exit( 1 );
     }
-}
\ No newline at end of file
+}

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PDFToImage.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PDFToImage.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PDFToImage.java
(original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PDFToImage.java
Sat Oct  5 13:57:05 2019
@@ -25,6 +25,7 @@ import java.io.IOException;
 import javax.imageio.ImageIO;
 
 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.interactive.form.PDAcroForm;
@@ -199,7 +200,7 @@ public final class PDFToImage
                 quality = "png".equals(imageFormat) ? 0f : 1f;
             }
 
-            try (PDDocument document = PDDocument.load(new File(pdfFile), password))
+            try (PDDocument document = PDFParser.load(new File(pdfFile), password))
             {
                 PDAcroForm acroForm = document.getDocumentCatalog().getAcroForm();
                 if (acroForm != null && acroForm.getNeedAppearances())

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java (original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java Sat
Oct  5 13:57:05 2019
@@ -26,6 +26,7 @@ import java.util.Map;
 import javax.print.PrintService;
 
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.encryption.AccessPermission;
 import org.apache.pdfbox.printing.Orientation;
 import org.apache.pdfbox.printing.PDFPageable;
@@ -146,7 +147,7 @@ public final class PrintPDF
             usage();
         }
 
-        try (PDDocument document = PDDocument.load(new File(pdfFile), password))
+        try (PDDocument document = PDFParser.load(new File(pdfFile), password))
         {
             AccessPermission ap = document.getCurrentAccessPermission();
             if (!ap.canPrint())

Modified: pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java
(original)
+++ pdfbox/branches/issue4569/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java
Sat Oct  5 13:57:05 2019
@@ -24,6 +24,7 @@ import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSObject;
 import org.apache.pdfbox.cos.COSStream;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdmodel.common.PDStream;
 
 /**
@@ -59,11 +60,12 @@ public class WriteDecodedDoc
     public void doIt(String in, String out, String password, boolean skipImages)
             throws IOException
     {
-        try (PDDocument doc = PDDocument.load(new File(in), password))
+        try (PDDocument doc = PDFParser.load(new File(in), password))
         {
             doc.setAllSecurityToBeRemoved(true);
             for (COSObject cosObject : doc.getDocument().getObjects())
             {
+                System.out.println(cosObject.getObjectNumber());
                 COSBase base = cosObject.getObject();
                 if (base instanceof COSStream)
                 {

Modified: pdfbox/branches/issue4569/tools/src/test/java/org/apache/pdfbox/tools/TestTextToPdf.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/test/java/org/apache/pdfbox/tools/TestTextToPdf.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/test/java/org/apache/pdfbox/tools/TestTextToPdf.java
(original)
+++ pdfbox/branches/issue4569/tools/src/test/java/org/apache/pdfbox/tools/TestTextToPdf.java
Sat Oct  5 13:57:05 2019
@@ -19,12 +19,12 @@ package org.apache.pdfbox.tools;
 import java.io.IOException;
 import java.io.StringReader;
 
+import org.apache.pdfbox.pdmodel.PDDocument;
+
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import org.apache.pdfbox.pdmodel.PDDocument;
-
 /**
  * Test suite for TextToPDF.
  */

Modified: pdfbox/branches/issue4569/tools/src/test/java/org/apache/pdfbox/tools/imageio/TestImageIOUtils.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/tools/src/test/java/org/apache/pdfbox/tools/imageio/TestImageIOUtils.java?rev=1868020&r1=1868019&r2=1868020&view=diff
==============================================================================
--- pdfbox/branches/issue4569/tools/src/test/java/org/apache/pdfbox/tools/imageio/TestImageIOUtils.java
(original)
+++ pdfbox/branches/issue4569/tools/src/test/java/org/apache/pdfbox/tools/imageio/TestImageIOUtils.java
Sat Oct  5 13:57:05 2019
@@ -42,6 +42,7 @@ import org.apache.commons.logging.LogFac
 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.PDResources;
 import org.apache.pdfbox.pdmodel.graphics.PDXObject;
 import org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject;
@@ -117,7 +118,7 @@ public class TestImageIOUtils extends Te
         try
         {
             float dpi = 36; // low DPI so that rendering is FAST
-            document = PDDocument.load(file);
+            document = PDFParser.load(file);
 
             // Save image resources of first page
             checkSaveResources(document.getPage(0).getResources());



Mime
View raw message