grabzit 3.3.5 → 3.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/grabzit/pdfoptions.rb +18 -2
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5da69eddc38e96180e23be4dba32f6385c2b91e7d255ef8118d87d19b0a8933a
4
- data.tar.gz: 6b9cc4715644808114913bf3887f2090ae53a05f15e0bdb720799ce48588a01a
3
+ metadata.gz: d5c074879dca344b56be89eb71d91b93e91f41a8db6c55367ba7c52426e65bc6
4
+ data.tar.gz: 7d177567a01807cd0dc0d1c3a64df730ae6ea81bedcfbe9839c441b5421cccc9
5
5
  SHA512:
6
- metadata.gz: 8891fd909276778b78ba6d177779ed4db9e6a8a1cace9c2120a92859d53a3622366d1e71828cb4bc6eca9f6ab355e886dd5681bc6c5309dd4f0a36cd5b5247c2
7
- data.tar.gz: 6901c0f929e3676f90f448d40ad6c929d84bc8bf90c6d408d5e778d4af26af0905e5ac1712bcbd60c716a9008ce1045451bfe2e12bb25b60fb7c903e11b1e259
6
+ metadata.gz: 1a3c3f2b52cf738243573fd71578c9a118b2dec9876b1099535d38e3e33b9b0e0bbe73976dae85d1c0900581873f538588bd3b000aa93d5756530cc199592c90
7
+ data.tar.gz: 5867872947014294b802d26f428b45751fc0c0a00793d681aaf337780dbbf2da89adf70ed54f94d436c5b6ba9f2cc5108f05af648ab152ec64d521bc73d55a2a
@@ -33,6 +33,7 @@ module GrabzIt
33
33
  @mergeId = nil
34
34
  @noCookieNotifications = false
35
35
  @address = nil
36
+ @cssMediaType = nil
36
37
  end
37
38
 
38
39
  # @return [Boolean] true if the background of the web page should be included in the PDF
@@ -74,7 +75,21 @@ module GrabzIt
74
75
  def orientation=(value)
75
76
  value = GrabzIt::Utility.nil_check(value).capitalize
76
77
  @orientation = value
77
- end
78
+ end
79
+
80
+ # @return [String] the CSS Media Type of the PDF to be returned
81
+ def cssMediaType
82
+ @cssMediaType
83
+ end
84
+
85
+ # Set the CSS Media Type of the PDF to be returned: 'Print' or 'Screen'
86
+ #
87
+ # @param value [String] CSS Media Type
88
+ # @return [void]
89
+ def cssMediaType=(value)
90
+ value = GrabzIt::Utility.nil_check(value).capitalize
91
+ @cssMediaType = value
92
+ end
78
93
 
79
94
  # @return [Boolean] true if the links should be included in the PDF
80
95
  def includeLinks
@@ -400,7 +415,7 @@ module GrabzIt
400
415
  items.push(GrabzIt::Utility.nil_check(url))
401
416
  end
402
417
 
403
- items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.b_to_str(@includeOutline),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_check(@coverURL),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),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),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_check(@templateVariables),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications))
418
+ items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.b_to_str(@includeOutline),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_check(@coverURL),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),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),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_check(@templateVariables),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@cssMediaType))
404
419
 
405
420
  return items.join("|")
406
421
  end
@@ -436,6 +451,7 @@ module GrabzIt
436
451
  params['mergeid'] = GrabzIt::Utility.nil_check(@mergeId)
437
452
  params['address'] = GrabzIt::Utility.nil_check(@address)
438
453
  params['nonotify'] = GrabzIt::Utility.b_to_str(@noCookieNotifications)
454
+ params['media'] = GrabzIt::Utility.nil_check(@cssMediaType)
439
455
 
440
456
  return params;
441
457
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grabzit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.5
4
+ version: 3.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - GrabzIt
@@ -24,11 +24,11 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- description: Use GrabzIt to convert HTML or URL's into images, PDF or DOCX documents.
28
- These captures have highly customizable options include altering quality, delay,
29
- size, browser type, geographic location and much more. Additionally GrabzIt can
30
- even convert HTML tables on the web into a CSV or Excel spreadsheet. As well as
31
- enabling online video's to be converted into animated GIF's.
27
+ description: Use GrabzIt to convert HTML or URL's into images, PDF, rendered HTML
28
+ or DOCX. These captures have highly customizable options include altering quality,
29
+ delay, size, browser type, geographic location and much more. Additionally GrabzIt
30
+ can even convert HTML tables on the web into a CSV or Excel spreadsheet. As well
31
+ as enabling online video's to be converted into animated GIF's.
32
32
  email: support@grabz.it
33
33
  executables: []
34
34
  extensions: []