ezprint 0.2.1 → 0.2.2
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.
- data/README +1 -1
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/ezprint.gemspec +2 -2
- data/lib/ezprint/pdf_helper.rb +10 -1
- metadata +4 -4
data/README
CHANGED
@@ -2,7 +2,7 @@ Ezprint
|
|
2
2
|
=======
|
3
3
|
|
4
4
|
Ezprint is a drop in replacement for the princely plugin. It uses PDFKit
|
5
|
-
as the backend instead
|
5
|
+
as the backend instead of princexml, possibly saving you millions of
|
6
6
|
dollars. I recommend using the Rack middleware component of PDFKit to
|
7
7
|
print PDFs in rails, but this plugin makes an easy transition from
|
8
8
|
prince->PDFKit for those using princely.
|
data/README.rdoc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
= Ezprint
|
2
2
|
|
3
3
|
Ezprint is a drop in replacement for the princely plugin. It uses PDFKit
|
4
|
-
as the backend instead
|
4
|
+
as the backend instead of princexml, possibly saving you millions of
|
5
5
|
dollars. I recommend using the Rack middleware component of PDFKit to
|
6
6
|
print PDFs in rails, but this plugin makes an easy transition from
|
7
7
|
prince->PDFKit for those using princely.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/ezprint.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ezprint}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jason Stewart"]
|
12
|
-
s.date = %q{2011-01-
|
12
|
+
s.date = %q{2011-01-13}
|
13
13
|
s.description = %q{A Rails wrapper for the PDFkit library. Meant to be a drop in replacement for princely.}
|
14
14
|
s.email = %q{jstewart@fusionary.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/ezprint/pdf_helper.rb
CHANGED
@@ -35,9 +35,18 @@ module EzPrint
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def make_and_send_pdf(pdf_name, options = {})
|
38
|
+
filename = "#{pdf_name}.pdf"
|
39
|
+
if request.headers['User-Agent'] =~ /MSIE ([0-9]{1,}[\.0-9]{0,})/
|
40
|
+
response.headers['Content-Disposition'] = "attachment;filename=\"#{filename}.pdf\""
|
41
|
+
response.headers['Content-Description'] = 'File Transfer'
|
42
|
+
response.headers['Content-Transfer-Encoding'] = 'binary'
|
43
|
+
response.headers['Expires'] = '0'
|
44
|
+
response.headers['Pragma'] = 'public'
|
45
|
+
end
|
46
|
+
|
38
47
|
send_data(
|
39
48
|
make_pdf(options),
|
40
|
-
:filename =>
|
49
|
+
:filename => filename,
|
41
50
|
:type => 'application/pdf'
|
42
51
|
)
|
43
52
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ezprint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jason Stewart
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-13 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|