pdf-forms 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pdf_forms/pdftk_wrapper.rb +8 -1
- data/lib/pdf_forms/version.rb +1 -1
- metadata +2 -2
@@ -27,7 +27,14 @@ module PdfForms
|
|
27
27
|
command = pdftk_command q_template, 'fill_form', safe_path(tmp.path), 'output', q_destination, add_options(tmp.path)
|
28
28
|
output = %x{#{command}}
|
29
29
|
unless File.readable?(destination) && File.size(destination) > 0
|
30
|
-
|
30
|
+
fdf_path = nil
|
31
|
+
begin
|
32
|
+
fdf_path = File.join(File.dirname(tmp.path), "#{Time.now.strftime '%Y%m%d%H%M%S'}.fdf")
|
33
|
+
fdf.save_to fdf_path
|
34
|
+
rescue Exception
|
35
|
+
fdf_path = "#{$!}\n#{$!.backtrace.join("\n")}"
|
36
|
+
end
|
37
|
+
raise PdftkError.new("failed to fill form with command\n#{command}\ncommand output was:\n#{output}\nfailing form data has been saved to #{fdf_path}")
|
31
38
|
end
|
32
39
|
ensure
|
33
40
|
tmp.unlink if tmp
|
data/lib/pdf_forms/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: pdf-forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.4.
|
5
|
+
version: 0.4.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- "Jens Kr\xC3\xA4mer"
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-08-
|
13
|
+
date: 2012-08-07 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: pry
|