Class: HexaPDF::CLI::Command

Inherits:
CmdParse::Command
  • Object
show all
Defined in:
lib/hexapdf/cli/command.rb

Overview

Base class for all hexapdf commands. It provides utility methods needed by the individual commands.

Direct Known Subclasses

Files, Images, Info, Inspect, Merge, Modify, Optimize

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ Command

:nodoc:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/hexapdf/cli/command.rb', line 46

def initialize(*args, &block) #:nodoc:
  super
  @out_options = OpenStruct.new
  @out_options.compact = true
  @out_options.compress_pages = false
  @out_options.object_streams = :preserve
  @out_options.xref_streams = :preserve
  @out_options.streams = :preserve

  @out_options.encryption = :preserve
  @out_options.enc_user_pwd = @out_options.enc_owner_pwd = nil
  @out_options.enc_key_length = 128
  @out_options.enc_algorithm = :aes
  @out_options.enc_force_v4 = false
  @out_options.enc_permissions = []
end