Class WriteDecodedDoc

  • All Implemented Interfaces:
    java.util.concurrent.Callable<java.lang.Integer>

    public class WriteDecodedDoc
    extends java.lang.Object
    implements java.util.concurrent.Callable<java.lang.Integer>
    load document and write with all streams decoded.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File infile  
      private java.io.File outfile  
      private java.lang.String password  
      private boolean skipImages  
      private java.io.PrintStream SYSERR  
    • Constructor Summary

      Constructors 
      Constructor Description
      WriteDecodedDoc()
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String calculateOutputFilename​(java.lang.String filename)  
      java.lang.Integer call()  
      void doIt​(java.lang.String in, java.lang.String out, java.lang.String password, boolean skipImages)
      This will perform the document reading, decoding and writing.
      static void main​(java.lang.String[] args)
      This will write a PDF document with completely decoded streams.
      private void processObject​(COSObject cosObject, boolean skipImages)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SYSERR

        private final java.io.PrintStream SYSERR
      • password

        private java.lang.String password
      • skipImages

        private boolean skipImages
      • infile

        private java.io.File infile
      • outfile

        private java.io.File outfile
    • Constructor Detail

      • WriteDecodedDoc

        public WriteDecodedDoc()
        Constructor.
    • Method Detail

      • doIt

        public void doIt​(java.lang.String in,
                         java.lang.String out,
                         java.lang.String password,
                         boolean skipImages)
                  throws java.io.IOException
        This will perform the document reading, decoding and writing.
        Parameters:
        in - The filename used for input.
        out - The filename used for output.
        password - The password to open the document.
        skipImages - Whether to skip decoding images.
        Throws:
        java.io.IOException - if the output could not be written
      • processObject

        private void processObject​(COSObject cosObject,
                                   boolean skipImages)
      • main

        public static void main​(java.lang.String[] args)
        This will write a PDF document with completely decoded streams.
        see usage() for commandline
        Parameters:
        args - command line arguments
      • call

        public java.lang.Integer call()
        Specified by:
        call in interface java.util.concurrent.Callable<java.lang.Integer>
      • calculateOutputFilename

        private static java.lang.String calculateOutputFilename​(java.lang.String filename)