icanhazpdf 0.0.5.3 → 0.0.5.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c2758adebd36e4a11ce70ef399dc717aedd06eb8
4
- data.tar.gz: 1165ed74c8395224fecb4a1e544dc3f75ea34217
3
+ metadata.gz: 13c466b889df9c65ceb3ea77503bf486a32230a9
4
+ data.tar.gz: c9c0f24e413fdabaa61d16b7166f48f3bfea5c33
5
5
  SHA512:
6
- metadata.gz: 41f427eb5e7cf38ba1dce8f3faf987c2c39602b7b20212073421ae429b42324b2388be29fc77f211cfb35593a2cc6684fb2b28932f5971c689f1d9518736501d
7
- data.tar.gz: f21ce764f6fd16cc9b2d9b1b861b449542cc07f125e2fea4d048a3044ccdbb811952e6497f2ae9bac4764917c8e85382aed085b97578b5eb4c61cbeeef569cb6
6
+ metadata.gz: 752a22fc90203a12647626d4cc3fba6f80e5afaf7cfa861847157242966183f2bc823894b033a84cbe7410469f67a2012ca72d81b64afc7cb965ac5bbf77a170
7
+ data.tar.gz: 81d6d11778cc820e289b29cb8006eda4bfe1a7183f77d82752ac6e4282c9c5d3bf1d38e14b26fb73d7b5cce928ff717249f094fa05aa0339f27d5fe488517a00
@@ -30,6 +30,10 @@ module Icanhazpdf
30
30
  encoded_url = "#{service_url}?url=#{Rack::Utils.escape(uri)}"
31
31
  encoded_url += "&use_wkhtmltopdf=true" if options.has_key?(:use_wkhtmltopdf) && options[:use_wkhtmltopdf] == true
32
32
  encoded_url += "&margin=#{options[:margin]}" if options.has_key?(:margin)
33
+ encoded_url += "&margin_left=#{options[:margin_left]}" if options.has_key?(:margin_left)
34
+ encoded_url += "&margin_top=#{options[:margin_top]}" if options.has_key?(:margin_top)
35
+ encoded_url += "&margin_right=#{options[:margin_right]}" if options.has_key?(:margin_right)
36
+ encoded_url += "&margin_bottom=#{options[:margin_bottom]}" if options.has_key?(:margin_bottom)
33
37
  encoded_url += "&landscape=true" if options.has_key?(:landscape) && options[:landscape] == true
34
38
 
35
39
  HTTParty.get(encoded_url, :timeout => 10000)
@@ -10,7 +10,7 @@ module Icanhazpdf
10
10
 
11
11
  # generate and render a pdf from a url
12
12
  def render_pdf_from(url, options = {})
13
- options.slice!(:filename, :use_wkhtmltopdf, :margin, :landscape)
13
+ options.slice!(:filename, :use_wkhtmltopdf, :margin, :landscape, :margin_left, :margin_top, :margin_right, :margin_bottom)
14
14
  render_response_for Icanhazpdf::Client.new.pdf_from_url(url, options), options
15
15
  end
16
16
 
@@ -1,3 +1,3 @@
1
1
  module Icanhazpdf
2
- VERSION = "0.0.5.3"
2
+ VERSION = "0.0.5.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icanhazpdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.3
4
+ version: 0.0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nic Pillinger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-09 00:00:00.000000000 Z
11
+ date: 2015-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler