grabzit 3.2.3 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/grabzit/pdfoptions.rb +17 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 688be2a43a18a59368cb1948f201417c7fb3a0b8
|
4
|
+
data.tar.gz: d2a3bd6899fc169e1c373a429147063a560f7222
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9cdc15cdc5db59a2268e32c8db072ffc1308284a0760542d88c61b9b91d5679f411511959242363e6322002168199e494850febd704da44308b638b6a702ae1
|
7
|
+
data.tar.gz: 8a565a0f19d8f2feef8ae97b7dea683415517f628708f3dd11113c4f987dab8f8e36d87d47319ca44137f6b53d1bb83425118e7de6719705dc95cb661d0bc7d2
|
data/lib/grabzit/pdfoptions.rb
CHANGED
@@ -25,6 +25,7 @@ module GrabzIt
|
|
25
25
|
@hideElement = nil
|
26
26
|
@waitForElement = nil
|
27
27
|
@noAds = false
|
28
|
+
@browserWidth = nil
|
28
29
|
end
|
29
30
|
|
30
31
|
# @return [Boolean] true if the background of the web page should be included in the PDF
|
@@ -172,6 +173,20 @@ module GrabzIt
|
|
172
173
|
@marginRight = value
|
173
174
|
end
|
174
175
|
|
176
|
+
# @return [Integer] the width of the browser in pixels
|
177
|
+
def browserWidth
|
178
|
+
@browserWidth
|
179
|
+
end
|
180
|
+
|
181
|
+
# Set the width of the browser in pixels
|
182
|
+
#
|
183
|
+
# @param value [Integer] the browser width
|
184
|
+
# @return [void]
|
185
|
+
def browserWidth(value)
|
186
|
+
@browserWidth = value
|
187
|
+
end
|
188
|
+
|
189
|
+
|
175
190
|
# @return [Integer] the number of milliseconds to wait before creating the capture
|
176
191
|
def delay
|
177
192
|
@delay
|
@@ -315,7 +330,7 @@ module GrabzIt
|
|
315
330
|
GrabzIt::Utility.nil_check(@customWaterMarkId)+"|"+GrabzIt::Utility.b_to_str(@includeLinks)+"|"+GrabzIt::Utility.b_to_str(@includeOutline)+"|"+
|
316
331
|
GrabzIt::Utility.nil_check(@title)+"|"+GrabzIt::Utility.nil_check(@coverURL)+"|"+GrabzIt::Utility.nil_int_check(@marginTop)+"|"+GrabzIt::Utility.nil_int_check(@marginLeft)+
|
317
332
|
"|"+GrabzIt::Utility.nil_int_check(@marginBottom)+"|"+GrabzIt::Utility.nil_int_check(@marginRight)+"|"+GrabzIt::Utility.nil_int_check(@delay)+"|"+
|
318
|
-
GrabzIt::Utility.nil_int_check(@requestAs)+"|"+GrabzIt::Utility.nil_check(@country)+"|"+GrabzIt::Utility.nil_int_check(@quality)+"|"+GrabzIt::Utility.nil_check(@templateId)+"|"+GrabzIt::Utility.nil_check(@hideElement)+"|"+GrabzIt::Utility.nil_check(@targetElement)+"|"+GrabzIt::Utility.nil_check(@exportURL)+"|"+GrabzIt::Utility.nil_check(@waitForElement)+"|"+GrabzIt::Utility.nil_check(@encryptionKey)+"|"+GrabzIt::Utility.b_to_str(@noAds)+"|"+GrabzIt::Utility.nil_check(@post)
|
333
|
+
GrabzIt::Utility.nil_int_check(@requestAs)+"|"+GrabzIt::Utility.nil_check(@country)+"|"+GrabzIt::Utility.nil_int_check(@quality)+"|"+GrabzIt::Utility.nil_check(@templateId)+"|"+GrabzIt::Utility.nil_check(@hideElement)+"|"+GrabzIt::Utility.nil_check(@targetElement)+"|"+GrabzIt::Utility.nil_check(@exportURL)+"|"+GrabzIt::Utility.nil_check(@waitForElement)+"|"+GrabzIt::Utility.nil_check(@encryptionKey)+"|"+GrabzIt::Utility.b_to_str(@noAds)+"|"+GrabzIt::Utility.nil_check(@post)+"|"+GrabzIt::Utility.nil_int_check(@browserWidth)
|
319
334
|
end
|
320
335
|
|
321
336
|
# @!visibility private
|
@@ -342,6 +357,7 @@ module GrabzIt
|
|
342
357
|
params['waitfor'] = GrabzIt::Utility.nil_check(@waitForElement)
|
343
358
|
params['noads'] = GrabzIt::Utility.b_to_str(@noAds)
|
344
359
|
params['post'] = GrabzIt::Utility.nil_check(@post)
|
360
|
+
params['bwidth'] = GrabzIt::Utility.nil_int_check(@browserWidth)
|
345
361
|
|
346
362
|
return params;
|
347
363
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grabzit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GrabzIt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|