class HexaPDF::CLI::Inspect

def initialize #:nodoc:

:nodoc:
def initialize #:nodoc:
  super('inspect', takes_commands: false)
  short_desc("Dig into the internal structure of a PDF file")
  long_desc(<<~EOF)
    Inspects a PDF file for debugging or testing purposes. This command is useful when one
    needs to inspect the internal object structure or a stream of a PDF file. A PDF object is
    always shown in the PDF syntax.
    If no arguments are given, the interactive mode is started. Otherwise the arguments are
    interpreted as interactive mode commands and executed. It is possible to specify more than
    one command in this way by separating them with semicolons, or whitespace in case the
    number of command arguments is fixed.
  EOF
  options.on("--password PASSWORD", "-p", String,
             "The password for decryption. Use - for reading from standard input.") do |pwd|
    @password = (pwd == '-' ? read_password : pwd)
  end
  @password = nil
  @serializer = HexaPDF::Serializer.new
end