pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1566043 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox: DecompressObjectstreams.java PdfDecompressor.java
Date Sat, 08 Feb 2014 16:32:38 GMT
Author: lehmi
Date: Sat Feb  8 16:32:38 2014
New Revision: 1566043

URL: http://svn.apache.org/r1566043
Log:
PDFBOX-1890: rename tool to better fit its purpose

Added:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/DecompressObjectstreams.java
      - copied, changed from r1565558, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/PdfDecompressor.java
Removed:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/PdfDecompressor.java

Copied: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/DecompressObjectstreams.java (from
r1565558, pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/PdfDecompressor.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/DecompressObjectstreams.java?p2=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/DecompressObjectstreams.java&p1=pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/PdfDecompressor.java&r1=1565558&r2=1566043&rev=1566043&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/PdfDecompressor.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/DecompressObjectstreams.java Sat Feb
 8 16:32:38 2014
@@ -17,6 +17,7 @@
 
 package org.apache.pdfbox;
 
+import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSObject;
 import org.apache.pdfbox.cos.COSStream;
 import org.apache.pdfbox.pdfparser.PDFObjectStreamParser;
@@ -32,7 +33,7 @@ import org.apache.pdfbox.persistence.uti
  * objects.
  * @author <a href="adam@apache.org">Adam Nichols</a>
  */
-public class PdfDecompressor {
+public class DecompressObjectstreams {
 
     /**
      * This is a very simple program, so everything is in the main method.
@@ -56,7 +57,7 @@ public class PdfDecompressor {
         PDDocument doc = null;
         try {
             doc = PDDocument.load(inputFilename);
-            for(COSObject objStream : doc.getDocument().getObjectsByType("ObjStm")) {
+            for(COSObject objStream : doc.getDocument().getObjectsByType(COSName.OBJ_STM))
{
                 COSStream stream = (COSStream)objStream.getObject();
                 PDFObjectStreamParser sp = new PDFObjectStreamParser(stream, doc.getDocument());
                 sp.parse();
@@ -80,8 +81,8 @@ public class PdfDecompressor {
      * Explains how to use the program.
      */
     private static void usage() {
-        System.err.println( "Usage: java -cp /path/to/pdfbox.jar;/path/to/commons-logging-api.jar
"
-                + "org.apache.pdfbox.PdfDecompressor <input PDF File> [<Output PDF
File>]\n"
+        System.err.println( "Usage: java -cp pdfbox-app-x.y.z.jar "
+                + "org.apache.pdfbox.DecompressObjectstreams <input PDF File> [<Output
PDF File>]\n"
                 + "  <input PDF File>       The PDF document to decompress\n"
                 + "  <output PDF File>      The output filename (default is to replace
.pdf with .unc.pdf)");
         System.exit(1);



Mime
View raw message