Class: PDFKit::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/pdfkit/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/pdfkit/configuration.rb', line 5

def initialize
  @meta_tag_prefix = 'pdfkit-'
  @wkhtmltopdf = '/usr/local/bin/wkhtmltopdf'
  @default_options = {
    :disable_smart_shrinking => true,
    :page_size => 'Letter',
    :margin_top => '0.75in',
    :margin_right => '0.75in',
    :margin_bottom => '0.75in',
    :margin_left => '0.75in',
    :encoding => "UTF-8"
  }
end

Instance Attribute Details

#default_optionsObject

Returns the value of attribute default_options.



3
4
5
# File 'lib/pdfkit/configuration.rb', line 3

def default_options
  @default_options
end

#meta_tag_prefixObject

Returns the value of attribute meta_tag_prefix.



3
4
5
# File 'lib/pdfkit/configuration.rb', line 3

def meta_tag_prefix
  @meta_tag_prefix
end

#wkhtmltopdfObject

Returns the value of attribute wkhtmltopdf.



3
4
5
# File 'lib/pdfkit/configuration.rb', line 3

def wkhtmltopdf
  @wkhtmltopdf
end