Permalink
Browse files

dont ask

  • Loading branch information...
1 parent 667df7a commit 895408f76c28af7b9e08680f3e3be30b2b67899c @darkhelmet darkhelmet committed Dec 20, 2011
Showing with 5 additions and 4 deletions.
  1. +1 −0 lib/active_pdftk/call.rb
  2. +4 −4 lib/active_pdftk/form.rb
@@ -184,6 +184,7 @@ def pdftk(dsl_statements = {})
dsl_statements = @default_statements.merge(dsl_statements)
args = set_cmd(dsl_statements)
args.unshift(@default_statements[:path])
+ args.push('dont_ask')
Open3.popen3(*args) do |stdin, stdout, stderr|
if @input.respond_to?(:rewind) && @input.respond_to?(:read)
@input.rewind
@@ -101,14 +101,14 @@ def save(output = nil, options = {})
output = StringIO.new if output.nil?
data = @pdftk.xfdf_support? ? Xfdf.new(to_h) : Fdf.new(to_h)
begin
- # if @template.is_a?(String)
- # data_input = StringIO.new(data.to_s)
- # else
+ if @template.is_a?(String)
+ data_input = StringIO.new(data.to_s)
+ else
t = Tempfile.new('fdf_data')
t.write(data.to_s)
data_input = t.path
t.close
- # end
+ end
@pdftk.fill_form(@template, data_input, options.merge(:output => output))
ensure
t.unlink if t

0 comments on commit 895408f

Please sign in to comment.