Class: PDFire::ConversionParams

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#allow_error_pageBoolean

Returns:

  • (Boolean)


70
71
72
# File 'lib/conversion_params.rb', line 70

def allow_error_page
  @allow_error_page
end

#block_adsBoolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/conversion_params.rb', line 46

def block_ads
  @block_ads
end

#cdnBoolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/conversion_params.rb', line 8

def cdn
  @cdn
end

#delayInteger

Returns:

  • (Integer)


58
59
60
# File 'lib/conversion_params.rb', line 58

def delay
  @delay
end

#emulate_mediaString

Returns:

  • (String)


64
65
66
# File 'lib/conversion_params.rb', line 64

def emulate_media
  @emulate_media
end

Returns:

  • (String)


38
39
40
# File 'lib/conversion_params.rb', line 38

def footer_template
  @footer_template
end

#formatFloat

Returns:

  • (Float)


18
19
20
# File 'lib/conversion_params.rb', line 18

def format
  @format
end

#header_templateString

Returns:

  • (String)


36
37
38
# File 'lib/conversion_params.rb', line 36

def header_template
  @header_template
end

#headersHash

Returns:

  • (Hash)


62
63
64
# File 'lib/conversion_params.rb', line 62

def headers
  @headers
end

#htmlString

Returns:

  • (String)


4
5
6
# File 'lib/conversion_params.rb', line 4

def html
  @html
end

#landscapeBoolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/conversion_params.rb', line 12

def landscape
  @landscape
end

#marginInteger, String

Returns:

  • (Integer, String)


24
25
26
# File 'lib/conversion_params.rb', line 24

def margin
  @margin
end

#margin_bottomInteger, String

Returns:

  • (Integer, String)


30
31
32
# File 'lib/conversion_params.rb', line 30

def margin_bottom
  @margin_bottom
end

#margin_leftInteger, String

Returns:

  • (Integer, String)


32
33
34
# File 'lib/conversion_params.rb', line 32

def margin_left
  @margin_left
end

#margin_rightInteger, String

Returns:

  • (Integer, String)


28
29
30
# File 'lib/conversion_params.rb', line 28

def margin_right
  @margin_right
end

#margin_topInteger, String

Returns:

  • (Integer, String)


26
27
28
# File 'lib/conversion_params.rb', line 26

def margin_top
  @margin_top
end

#optimizeBoolean

Returns:

  • (Boolean)


72
73
74
# File 'lib/conversion_params.rb', line 72

def optimize
  @optimize
end

#owner_passwordString

Returns:

  • (String)


66
67
68
# File 'lib/conversion_params.rb', line 66

def owner_password
  @owner_password
end

#page_rangesString

Returns:

  • (String)


34
35
36
# File 'lib/conversion_params.rb', line 34

def page_ranges
  @page_ranges
end

#paper_heightInteger, String

Returns:

  • (Integer, String)


22
23
24
# File 'lib/conversion_params.rb', line 22

def paper_height
  @paper_height
end

#paper_widthInteger, String

Returns:

  • (Integer, String)


20
21
22
# File 'lib/conversion_params.rb', line 20

def paper_width
  @paper_width
end

#prefer_css_page_sizeBoolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/conversion_params.rb', line 40

def prefer_css_page_size
  @prefer_css_page_size
end

Returns:

  • (Boolean)


14
15
16
# File 'lib/conversion_params.rb', line 14

def print_background
  @print_background
end

#scaleBoolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/conversion_params.rb', line 16

def scale
  @scale
end

#selectorString

Returns:

  • (String)


48
49
50
# File 'lib/conversion_params.rb', line 48

def selector
  @selector
end

#storageBoolean, Hash

Returns:

  • (Boolean, Hash)


10
11
12
# File 'lib/conversion_params.rb', line 10

def storage
  @storage
end

#timeoutInteger

Returns:

  • (Integer)


60
61
62
# File 'lib/conversion_params.rb', line 60

def timeout
  @timeout
end

#urlString

Returns:

  • (String)


6
7
8
# File 'lib/conversion_params.rb', line 6

def url
  @url
end

#user_passwordString

Returns:

  • (String)


68
69
70
# File 'lib/conversion_params.rb', line 68

def user_password
  @user_password
end

#viewport_heightInteger, String

Returns:

  • (Integer, String)


44
45
46
# File 'lib/conversion_params.rb', line 44

def viewport_height
  @viewport_height
end

#viewport_widthInteger, String

Returns:

  • (Integer, String)


42
43
44
# File 'lib/conversion_params.rb', line 42

def viewport_width
  @viewport_width
end

#wait_for_selectorString

Returns:

  • (String)


50
51
52
# File 'lib/conversion_params.rb', line 50

def wait_for_selector
  @wait_for_selector
end

#wait_for_selector_timeoutInteger

Returns:

  • (Integer)


52
53
54
# File 'lib/conversion_params.rb', line 52

def wait_for_selector_timeout
  @wait_for_selector_timeout
end

#wait_untilString

Returns:

  • (String)


54
55
56
# File 'lib/conversion_params.rb', line 54

def wait_until
  @wait_until
end

#wait_until_timeoutInteger

Returns:

  • (Integer)


56
57
58
# File 'lib/conversion_params.rb', line 56

def wait_until_timeout
  @wait_until_timeout
end

Instance Method Details

#to_mapObject



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/conversion_params.rb', line 74

def to_map
  map = {}

  map['html'] = @html if @html != nil
  map['url'] = @url if @url != nil
  map['cdn'] = @cdn if @cdn != nil
  map['storage'] = @storage if @storage != nil
  map['landscape'] = @landscape if @landscape != nil
  map['printBackground'] = @print_background if @print_background != nil
  map['scale'] = @scale if @scale != nil
  map['format'] = @format if @format != nil
  map['paperWidth'] = @paper_width if @paper_width != nil
  map['paperHeight'] = @paper_height if @paper_height != nil
  map['margin'] = @margin if @margin != nil
  map['marginTop'] = @margin_top if @margin_top != nil
  map['marginRight'] = @margin_right if @margin_right != nil
  map['marginBottom'] = @margin_bottom if @margin_bottom != nil
  map['marginLeft'] = @margin_left if @margin_left != nil
  map['pageRanges'] = @page_ranges if @page_ranges != nil
  map['headerTemplate'] = @header_template if @header_template != nil
  map['footerTemplate'] = @footer_template if @footer_template != nil
  map['preferCSSPageSize'] = @prefer_css_page_size if @prefer_css_page_size != nil
  map['viewportWidth'] = @viewport_width if @viewport_width != nil
  map['viewportHeight'] = @viewport_height if @viewport_height != nil
  map['blockAds'] = @block_ads if @block_ads != nil
  map['selector'] = @selector if @selector != nil
  map['waitForSelector'] = @wait_for_selector if @wait_for_selector != nil
  map['waitForSelectorTimeout'] = @wait_for_selector_timeout if @wait_for_selector_timeout != nil
  map['waitUntil'] = @wait_until if @wait_until != nil
  map['waitUntilTimeout'] = @wait_until_timeout if @wait_until_timeout != nil
  map['delay'] = @delay if @delay != nil
  map['timeout'] = @timeout if @timeout != nil
  map['headers'] = @headers if @headers != nil
  map['emulateMedia'] = @emulate_media if @emulate_media != nil
  map['ownerPassword'] = @owner_password if @owner_password != nil
  map['userPassword'] = @user_password if @user_password != nil
  map['allowErrorPage'] = @allow_error_page if @allow_error_page != nil
  map['optimize'] = @optimize if @optimize != nil

  return map
end