lib/ext/pdf_forms.rb
#
# Fill form using FDF file directly
#
Fill form using FDF file directly
Fill form using FDF file directly
def fill_form_with_fdf(template, destination, fdf_path, fill_options = {}, flatten:)
      args = pdftk_arguments(template, destination, fdf_path, flatten: flatten)
      result = call_pdftk(*append_options(args, fill_options))
      if !File.readable?(destination) || File.size(destination).zero?
        raise ::PdfForms::PdftkError, "failed to fill form with command\n#{pdftk} #{args.flatten.compact.join " "}\ncommand output was:\n#{result}"
      end
    end
def fill_form_with_fdf ( template , destination , fdf_path , fill_options = { } , flatten : ) args = pdftk_arguments ( template , destination , fdf_path , flatten : flatten ) result = call_pdftk ( * append_options ( args , fill_options ) ) if ! File . readable? ( destination ) || File . size ( destination ) . zero? raise :: PdfForms :: PdftkError , "failed to fill form with command\n#{pdftk} #{args.flatten.compact.join " "}\ncommand output was:\n#{result}" end end
Fill form using FDF file directly
Fill form using FDF file directly
template
<not_specific>
destination
<not_specific>
fdf_path
<not_specific>
fill_options
<not_specific>
flatten
<not_specific>