Skip to content

Commit

Permalink
PDFBOX-1890: rename tool to better fit its purpose
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1566043 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
lehmi committed Feb 8, 2014
1 parent 68d99b2 commit c0f0cc0
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -32,7 +33,7 @@
* objects.
* @author <a href="[email protected]">Adam Nichols</a>
*/
public class PdfDecompressor {
public class DecompressObjectstreams {

/**
* This is a very simple program, so everything is in the main method.
Expand All @@ -56,7 +57,7 @@ public static void main(String[] args) {
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();
Expand All @@ -80,8 +81,8 @@ public static void main(String[] args) {
* 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);
Expand Down

0 comments on commit c0f0cc0

Please sign in to comment.