pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1571842 - in /pdfbox/trunk: app/ examples/src/main/java/org/apache/pdfbox/examples/ant/ pdfbox/src/main/java/org/apache/pdfbox/util/ tools/src/main/java/org/apache/pdfbox/ tools/src/main/java/org/apache/pdfbox/tools/ tools/src/test/java/or...
Date Tue, 25 Feb 2014 22:09:57 GMT
Author: jahewson
Date: Tue Feb 25 22:09:56 2014
New Revision: 1571842

URL: http://svn.apache.org/r1571842
Log:
PDFBOX-1943: Move pdfbox-tools to its own package

Added:
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/DecompressObjectstreams.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/DecompressObjectstreams.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/Decrypt.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/Decrypt.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/Encrypt.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/Encrypt.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExportFDF.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExportFDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExportXFDF.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExportXFDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractImages.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExtractImages.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExtractText.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ImportFDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportXFDF.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ImportXFDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/OverlayPDF.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/OverlayPDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFBox.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFBox.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFDebugger.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFDebugger.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFMerger.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFMerger.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java
      - copied, changed from r1571839, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFReader.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFSplit.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFSplit.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFToImage.java
      - copied, changed from r1571586, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFToImage.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PrintPDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/TextToPDF.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/TextToPDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java
      - copied, changed from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/WriteDecodedDoc.java
Removed:
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/DecompressObjectstreams.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/Decrypt.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/Encrypt.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExportFDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExportXFDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExtractImages.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExtractText.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ImportFDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ImportXFDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/OverlayPDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFBox.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFDebugger.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFMerger.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFReader.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFSplit.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFToImage.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PrintPDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/TextToPDF.java
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/WriteDecodedDoc.java
Modified:
    pdfbox/trunk/app/pom.xml
    pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/ant/PDFToTextTask.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/RenderUtil.java
    pdfbox/trunk/tools/src/test/java/org/apache/pdfbox/TestExtractText.java
    pdfbox/trunk/tools/src/test/java/org/apache/pdfbox/TestTextToPdf.java

Modified: pdfbox/trunk/app/pom.xml
URL: http://svn.apache.org/viewvc/pdfbox/trunk/app/pom.xml?rev=1571842&r1=1571841&r2=1571842&view=diff
==============================================================================
--- pdfbox/trunk/app/pom.xml (original)
+++ pdfbox/trunk/app/pom.xml Tue Feb 25 22:09:56 2014
@@ -69,7 +69,7 @@
             <Embed-Dependency>*;scope=provided;inline=org/apache/**|org/bouncycastle/**|com/ibm/icu/**</Embed-Dependency>
             <Bundle-DocURL>${project.url}</Bundle-DocURL>
             <Import-Package>!junit.framework,!junit.textui,javax.*;resolution:=optional,org.apache.avalon.framework.logger;resolution:=optional,org.apache.log;resolution:=optional,org.apache.log4j;resolution:=optional,*</Import-Package>
-            <Main-Class>org.apache.pdfbox.PDFBox</Main-Class>
+            <Main-Class>org.apache.pdfbox.tools.PDFBox</Main-Class>
           </instructions>
         </configuration>
       </plugin>

Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/ant/PDFToTextTask.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/ant/PDFToTextTask.java?rev=1571842&r1=1571841&r2=1571842&view=diff
==============================================================================
--- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/ant/PDFToTextTask.java
(original)
+++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/ant/PDFToTextTask.java
Tue Feb 25 22:09:56 2014
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.pdfbox.tools.ExtractText;
 import org.apache.tools.ant.DirectoryScanner;
 import org.apache.tools.ant.Task;
 
@@ -72,7 +73,7 @@ public class PDFToTextTask extends Task
                     textFile = textFile + "txt";
                     try
                     {
-                        org.apache.pdfbox.ExtractText.main( new String[] { pdfFile, textFile
} );
+                        ExtractText.main(new String[]{pdfFile, textFile});
                     }
                     catch( Exception e )
                     {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/RenderUtil.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/RenderUtil.java?rev=1571842&r1=1571841&r2=1571842&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/RenderUtil.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/RenderUtil.java Tue Feb 25 22:09:56
2014
@@ -31,69 +31,42 @@ import org.apache.pdfbox.pdmodel.common.
 
 /**
  * RenderUtil provides some convenience methods to print or draw a single page of a document.
- * 
+ * @author Andreas Lehmkühler
  */
-public class RenderUtil
+public final class RenderUtil
 {
     private RenderUtil()
     {
-        // Utility class. Don't instantiate.
-    }
-
-    private static void print(PDDocument document, PrinterJob job, boolean silent) throws
PrinterException
-    {
-        if (job == null)
-        {
-            throw new PrinterException("The given printer job is null.");
-        }
-        else
-        {
-            job.setPageable(new PDPageable(document, job));
-            if (silent || job.printDialog())
-            {
-                job.print();
-            }
-        }
     }
 
     /**
-     * This will send the PDF to the default printer without prompting the user for any printer
settings.
-     * 
+     * Prints the given document using the default printer without prompting the user.
      * @param document the document to be printed
-     * @param printJob A printer job definition.
-     * @see RenderUtil#print(PDDocument)
-     * 
-     * @throws PrinterException If there is an error while printing.
+     * @throws PrinterException if the document cannot be printed
      */
-    public static void silentPrint(PDDocument document, PrinterJob printJob) throws PrinterException
+    public static void silentPrint(PDDocument document) throws PrinterException
     {
-        print(document, printJob, true);
+        silentPrint(document, PrinterJob.getPrinterJob());
     }
 
     /**
-     * @see RenderUtil#print(PDDocument)
-     * 
+     * Prints the given document using the default printer without prompting the user.
      * @param document the document to be printed
-     * @param printJob The printer job.
-     * 
-     * @throws PrinterException If there is an error while sending the PDF to the printer,
or you do not have
-     *             permissions to print this document.
+     * @param printerJob a printer job definition
+     * @throws PrinterException if the document cannot be printed
      */
-    public static void print(PDDocument document, PrinterJob printJob) throws PrinterException
+    public static void silentPrint(PDDocument document, PrinterJob printerJob) throws PrinterException
     {
-        print(document, printJob, false);
+        print(document, printerJob, true);
     }
 
     /**
-     * This will send the PDF document to a printer. The printing functionality depends on
the
-     * org.apache.pdfbox.pdfviewer.PageDrawer functionality. The PageDrawer is a work in
progress and some PDFs will
-     * print correctly and some will not. This is a convenience method to create the java.awt.print.PrinterJob.
The
-     * PDPageable implements the java.awt.print.Pageable interface and the java.awt.print.Printable
interface, so
-     * advanced printing capabilities can be done by using those interfaces instead of this
method.
-     * 
+     * Prints the given document using the default printer without prompting the user.
+     * The image is generated using {@link org.apache.pdfbox.pdfviewer.PageDrawer}.
+     * This is a convenience method to create the java.awt.print.PrinterJob.
+     * Advanced printing tasks can be performed using {@link PDPageable} instead.
      * @param document the document to be printed
-     * @throws PrinterException If there is an error while sending the PDF to the printer,
or you do not have
-     *             permissions to print the document.
+     * @throws PrinterException if the document cannot be printed
      */
     public static void print(PDDocument document) throws PrinterException
     {
@@ -101,24 +74,41 @@ public class RenderUtil
     }
 
     /**
-     * This will send the given PDF to the default printer without prompting the user for
any printer settings.
-     * 
+     * Prints the given document using the default printer without prompting the user.
      * @param document the document to be printed
-     * @see RenderUtil#print(PDDocument)
-     * 
-     * @throws PrinterException If there is an error while printing.
+     * @param printerJob The printer job.
+     * @throws PrinterException if the document cannot be printed
      */
-    public static void silentPrint(PDDocument document) throws PrinterException
+    public static void print(PDDocument document, PrinterJob printerJob) throws PrinterException
     {
-        silentPrint(document, PrinterJob.getPrinterJob());
+        print(document, printerJob, false);
     }
 
+    // prints a document
+    private static void print(PDDocument document, PrinterJob job, boolean isSilent)
+            throws PrinterException
+    {
+        if (job == null)
+        {
+            throw new IllegalArgumentException("job cannot be null");
+        }
+        else
+        {
+            job.setPageable(new PDPageable(document, job));
+            if (isSilent || job.printDialog())
+            {
+                job.print();
+            }
+        }
+    }
+
+    // =============================================================================================
+
     /**
      * Convert the given page to an output image with 8 bits per pixel and the double default
screen resolution.
-     * 
+     *
      * @param page the page to be converted.
      * @return A graphical representation of this page.
-     * 
      * @throws IOException If there is an error drawing to the image.
      */
     public static BufferedImage convertToImage(PDPage page) throws IOException
@@ -132,12 +122,11 @@ public class RenderUtil
 
     /**
      * Convert the given page to an output image.
-     * 
+     *
      * @param page the page to be converted.
      * @param imageType the image type (see {@link BufferedImage}.TYPE_*)
      * @param resolution the resolution in dpi (dots per inch)
      * @return A graphical representation of this page.
-     * 
      * @throws IOException If there is an error drawing to the image.
      */
     public static BufferedImage convertToImage(PDPage page, int imageType, int resolution)
throws IOException
@@ -184,6 +173,7 @@ public class RenderUtil
         return image;
     }
 
+    // renders a page to the given graphics
     private static void renderPage(PDPage page, Graphics2D graphics, int width, int height,
float scaleX, float scaleY)
             throws IOException
     {

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/DecompressObjectstreams.java
(from r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/DecompressObjectstreams.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/DecompressObjectstreams.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/DecompressObjectstreams.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/DecompressObjectstreams.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/DecompressObjectstreams.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/DecompressObjectstreams.java
Tue Feb 25 22:09:56 2014
@@ -15,7 +15,7 @@
  *  under the License.
  */
 
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSObject;
@@ -82,7 +82,7 @@ public class DecompressObjectstreams {
      */
     private static void usage() {
         System.err.println( "Usage: java -cp pdfbox-app-x.y.z.jar "
-                + "org.apache.pdfbox.DecompressObjectstreams <input PDF File> [<Output
PDF File>]\n"
+                + "org.apache.pdfbox.tools.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);

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/Decrypt.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/Decrypt.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/Decrypt.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/Decrypt.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/Decrypt.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/Decrypt.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/Decrypt.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -30,7 +30,7 @@ import org.apache.pdfbox.pdmodel.encrypt
  * This will read a document from the filesystem, decrypt it and and then write
  * the results to the filesystem. <br/><br/>
  *
- * usage: java org.apache.pdfbox.Decrypt &lt;password&gt; &lt;inputfile&gt;
&lt;outputfile&gt;
+ * usage: java org.apache.pdfbox.tools.Decrypt &lt;password&gt; &lt;inputfile&gt;
&lt;outputfile&gt;
  *
  * @author  <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
  * @version $Revision: 1.5 $

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/Encrypt.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/Encrypt.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/Encrypt.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/Encrypt.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/Encrypt.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/Encrypt.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/Encrypt.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.io.FileInputStream;
 import java.io.InputStream;

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExportFDF.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExportFDF.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExportFDF.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExportFDF.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExportFDF.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExportFDF.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExportFDF.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.io.IOException;
 

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExportXFDF.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExportXFDF.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExportXFDF.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExportXFDF.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExportXFDF.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExportXFDF.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExportXFDF.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.io.IOException;
 

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractImages.java (from
r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExtractImages.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractImages.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractImages.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExtractImages.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExtractImages.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractImages.java Tue Feb 25
22:09:56 2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.awt.image.BufferedImage;
 import java.io.File;
@@ -38,7 +38,7 @@ import org.apache.pdfbox.util.ImageIOUti
 /**
  * This will read a read pdf and extract images. <br/><br/>
  *
- * usage: java org.apache.pdfbox.ExtractImages &lt;pdffile&gt; &lt;password&gt;
[imageprefix]
+ * usage: java org.apache.pdfbox.tools.ExtractImages &lt;pdffile&gt; &lt;password&gt;
[imageprefix]
  *
  * @author  <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
  * @version $Revision: 1.7 $
@@ -269,7 +269,7 @@ public class ExtractImages
      */
     private static void usage()
     {
-        System.err.println( "Usage: java org.apache.pdfbox.ExtractImages [OPTIONS] <PDF
file>\n" +
+        System.err.println( "Usage: java org.apache.pdfbox.tools.ExtractImages [OPTIONS]
<PDF file>\n" +
             "  -password  <password>        Password to decrypt document\n" +
             "  -prefix  <image-prefix>      Image prefix(default to pdf name)\n" +
             "  -addkey                      add the internal image key to the file name\n"
+

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExtractText.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExtractText.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ExtractText.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.io.File;
 import java.io.FileOutputStream;

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ImportFDF.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ImportFDF.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ImportFDF.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.io.IOException;
 
@@ -107,7 +107,7 @@ public class ImportFDF
      */
     private static void usage()
     {
-        System.err.println( "usage: org.apache.pdfbox.ImportFDF <pdf-file> <fdf-file>
<output-file>" );
+        System.err.println( "usage: org.apache.pdfbox.tools.ImportFDF <pdf-file> <fdf-file>
<output-file>" );
     }
 
     /**

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportXFDF.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ImportXFDF.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportXFDF.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportXFDF.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ImportXFDF.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/ImportXFDF.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportXFDF.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
@@ -108,7 +108,7 @@ public class ImportXFDF
      */
     private static void usage()
     {
-        System.err.println( "usage: org.apache.pdfbox.ImportXFDF <pdf-file> <fdf-file>
<output-file>" );
+        System.err.println( "usage: org.apache.pdfbox.tools.ImportXFDF <pdf-file> <fdf-file>
<output-file>" );
     }
 
     /**

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/OverlayPDF.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/OverlayPDF.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/OverlayPDF.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/OverlayPDF.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/OverlayPDF.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/OverlayPDF.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/OverlayPDF.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.io.File;
 import java.io.IOException;

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFBox.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFBox.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFBox.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFBox.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFBox.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFBox.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFBox.java Tue Feb 25 22:09:56
2014
@@ -14,9 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 
+import org.apache.pdfbox.Version;
+
 /**
  * Simple wrapper around all the command line utilities included in PDFBox.
  * Used as the main class in the runnable standalone PDFBox jar.
@@ -120,7 +122,7 @@ public class PDFBox 
 
     private static void showMessageAndExit() 
     {
-        System.err.println("PDFDBox version: \""+Version.getVersion()+ "\"");
+        System.err.println("PDFDBox version: \""+ Version.getVersion()+ "\"");
         System.err.println("\nUsage: java pdfbox-app-x.y.z.jar <command> <args..>");
         System.err.println("\nPossible commands are:\n");
         System.err.println("  ConvertColorspace");

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFDebugger.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFDebugger.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFDebugger.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFDebugger.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFDebugger.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFDebugger.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFDebugger.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import org.apache.pdfbox.exceptions.InvalidPasswordException;
 

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFMerger.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFMerger.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFMerger.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFMerger.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFMerger.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFMerger.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFMerger.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import org.apache.pdfbox.util.PDFMergerUtility;
 

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java (from r1571839,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFReader.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFReader.java&r1=1571839&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFReader.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFReader.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.awt.Dimension;
 import java.awt.event.MouseEvent;

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFSplit.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFSplit.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFSplit.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFSplit.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFSplit.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFSplit.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFSplit.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.io.File;
 import java.io.IOException;

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFToImage.java (from r1571586,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFToImage.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFToImage.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFToImage.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFToImage.java&r1=1571586&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PDFToImage.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFToImage.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.awt.HeadlessException;
 import java.awt.Toolkit;

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PrintPDF.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PrintPDF.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/PrintPDF.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.awt.print.PrinterJob;
 import java.io.File;

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/TextToPDF.java (from r1571090,
pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/TextToPDF.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/TextToPDF.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/TextToPDF.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/TextToPDF.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/TextToPDF.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/TextToPDF.java Tue Feb 25 22:09:56
2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.io.BufferedReader;
 import java.io.File;

Copied: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java (from
r1571090, pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/WriteDecodedDoc.java)
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java?p2=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java&p1=pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/WriteDecodedDoc.java&r1=1571090&r2=1571842&rev=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/WriteDecodedDoc.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java Tue Feb
25 22:09:56 2014
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.pdfbox;
+package org.apache.pdfbox.tools;
 
 import java.io.File;
 import java.io.IOException;

Modified: pdfbox/trunk/tools/src/test/java/org/apache/pdfbox/TestExtractText.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/test/java/org/apache/pdfbox/TestExtractText.java?rev=1571842&r1=1571841&r2=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/test/java/org/apache/pdfbox/TestExtractText.java (original)
+++ pdfbox/trunk/tools/src/test/java/org/apache/pdfbox/TestExtractText.java Tue Feb 25 22:09:56
2014
@@ -20,6 +20,7 @@ import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 
 import junit.framework.TestCase;
+import org.apache.pdfbox.tools.ExtractText;
 
 /**
  * Test suite for ExtractText. 
@@ -39,7 +40,7 @@ public class TestExtractText extends Tes
         System.setOut(new PrintStream(outBytes));
         try 
         {
-            ExtractText.main(new String[] {"src/test/resources/org/apache/pdfbox/testPDFPackage.pdf",

+            ExtractText.main(new String[]{"src/test/resources/org/apache/pdfbox/testPDFPackage.pdf",
                     "-console", "-encoding UTF-8"});
         } 
         finally 

Modified: pdfbox/trunk/tools/src/test/java/org/apache/pdfbox/TestTextToPdf.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/test/java/org/apache/pdfbox/TestTextToPdf.java?rev=1571842&r1=1571841&r2=1571842&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/test/java/org/apache/pdfbox/TestTextToPdf.java (original)
+++ pdfbox/trunk/tools/src/test/java/org/apache/pdfbox/TestTextToPdf.java Tue Feb 25 22:09:56
2014
@@ -26,7 +26,7 @@ import junit.framework.TestSuite;
 
 import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
-import org.apache.pdfbox.TextToPDF;
+import org.apache.pdfbox.tools.TextToPDF;
 
 /**
  * Test suite for TextToPDF.



Mime
View raw message