prawn-fillform 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/data/template.pdf +0 -0
- data/data/test.jpg +0 -0
- data/examples/main.rb +19 -0
- data/lib/prawn-fillform/version.rb +2 -1
- data/lib/prawn-fillform.rb +1 -1
- metadata +4 -1
data/data/template.pdf
ADDED
Binary file
|
data/data/test.jpg
ADDED
Binary file
|
data/examples/main.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
|
4
|
+
|
5
|
+
require 'prawn'
|
6
|
+
require 'prawn/fillform'
|
7
|
+
|
8
|
+
|
9
|
+
data = {}
|
10
|
+
data[:page_1] = {}
|
11
|
+
data[:page_1][:firstname] = "Max"
|
12
|
+
data[:page_1][:lastname] = "Mustermann"
|
13
|
+
data[:page_1][:photo] = "../data/test.jpg"
|
14
|
+
|
15
|
+
|
16
|
+
Prawn::Document.generate "../data/output.pdf", :template => "../data/template.pdf" do |pdf|
|
17
|
+
pdf.fill_form_with(data)
|
18
|
+
end
|
19
|
+
|
data/lib/prawn-fillform.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prawn-fillform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -21,6 +21,9 @@ files:
|
|
21
21
|
- .gitignore
|
22
22
|
- Gemfile
|
23
23
|
- Rakefile
|
24
|
+
- data/template.pdf
|
25
|
+
- data/test.jpg
|
26
|
+
- examples/main.rb
|
24
27
|
- lib/prawn-fillform.rb
|
25
28
|
- lib/prawn-fillform/version.rb
|
26
29
|
- prawn-fillform.gemspec
|