Class: WkHtml::ToPdf::GlobalSettings

Inherits:
Object
  • Object
show all
Includes:
Settings
Defined in:
lib/wkhtml/to_pdf/global_settings.rb,
ext/wkhtml/wkhtml.c

Constant Summary collapse

KEYS =
%w(
  size.paperSize
  size.width
  size.height
  orientation
  colorMode
  resolution
  dpi
  pageOffset
  copies
  collate
  outline
  outlineDepth
  dumpOutline
  out
  documentTitle
  useCompression
  margin.top
  margin.bottom
  margin.left
  margin.right
  imageDPI
  imageQuality
  load.cookieJar
)
DEFAULTS =
{}

Constants included from Settings

Settings::FALSE, Settings::TRUE

Instance Method Summary collapse

Methods included from Settings

included, #initialize, #to_hash

Instance Method Details

#[]Object

#[]=Object

#out=(v) ⇒ Object

Raises:

  • (ArgumentError)


36
37
38
39
40
# File 'lib/wkhtml/to_pdf/global_settings.rb', line 36

def out=(v)
  v = CommonSettings::cleanup_path(v)
  raise ArgumentError.new("#{v} is not writeable") unless CommonSettings::writable?(v)
  self['out'] = v
end

#stdout=(v) ⇒ Object



42
43
44
# File 'lib/wkhtml/to_pdf/global_settings.rb', line 42

def stdout=(v)
  self.out = v ? CommonSettings::STDOUT : nil
end