Class WriteDecodedDoc

java.lang.Object
org.apache.pdfbox.tools.WriteDecodedDoc
All Implemented Interfaces:
Callable<Integer>

public class WriteDecodedDoc extends Object implements Callable<Integer>
load document and write with all streams decoded.
  • Field Details

    • SYSERR

      private final PrintStream SYSERR
    • password

      private String password
    • skipImages

      private boolean skipImages
    • infile

      private File infile
    • outfile

      private File outfile
  • Constructor Details

    • WriteDecodedDoc

      public WriteDecodedDoc()
      Constructor.
  • Method Details

    • doIt

      public void doIt(String in, String out, String password, boolean skipImages) throws 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:
      IOException - if the output could not be written
    • processObject

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

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

      public Integer call()
      Specified by:
      call in interface Callable<Integer>
    • calculateOutputFilename

      private static String calculateOutputFilename(String filename)