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 +4 -4
- data/lib/icanhazpdf/client.rb +4 -0
- data/lib/icanhazpdf/controller.rb +1 -1
- data/lib/icanhazpdf/version.rb +1 -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: 13c466b889df9c65ceb3ea77503bf486a32230a9
|
4
|
+
data.tar.gz: c9c0f24e413fdabaa61d16b7166f48f3bfea5c33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 752a22fc90203a12647626d4cc3fba6f80e5afaf7cfa861847157242966183f2bc823894b033a84cbe7410469f67a2012ca72d81b64afc7cb965ac5bbf77a170
|
7
|
+
data.tar.gz: 81d6d11778cc820e289b29cb8006eda4bfe1a7183f77d82752ac6e4282c9c5d3bf1d38e14b26fb73d7b5cce928ff717249f094fa05aa0339f27d5fe488517a00
|
data/lib/icanhazpdf/client.rb
CHANGED
@@ -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
|
|
data/lib/icanhazpdf/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2015-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|