Class Main


  • public final class Main
    extends java.lang.Object
    Command-line demonstration of the COS API: parses a PDF file (path given as the first argument), prints a short structural summary, then evaluates every COS path expression given as subsequent arguments.
       java -jar pd4ml-cos.jar sample.pdf "/Root/Pages/Count" "/Root/Pages/Kids[0]/MediaBox"
       java -jar pd4ml-cos.jar --password=secret protected.pdf "/Root/Pages/Count"
     
    With no arguments, runs against a small PDF built in memory so the demo works with no external files at all. --password=... is tried as both the user and the owner password if the given PDF turns out to be encrypted; omit it to try an empty password (the common case for a document with no open password but a restricted owner password).
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] rawArgs)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • main

        public static void main​(java.lang.String[] rawArgs)
                         throws java.io.IOException,
                                COSException
        Throws:
        java.io.IOException
        COSException