PdfForms::PdftkWrapper
Inherits PdfForms::NormalizePath / Reference / Object
Wraps calls to PdfTk
Constants
Constructors
Initializes a new wrapper instance. Pdftk will be autodetected from PATH: PdftkWrapper.new(:flatten => true, :encrypt => true, :encrypt_options => "allow Printing")
The pdftk binary may also be explecitly specified: PdftkWrapper.new("/usr/bin/pdftk", :flatten => true, :encrypt => true, :encrypt_options => "allow Printing")
Besides the options shown above, the drop_xfa or drop_xmp options are also supported.
Instance methods
returns the commands output, check general execution success with $?.success?
concatenate documents, can optionally specify page ranges
args: in_file1, {in_file2 => ["1-2", "4-10"]}, ... , in_file_n, output
pdftk.fill_form "/path/to/form.pdf", "/path/to/destination.pdf", :field1 => "value 1"
get field names for template
Initialize the object with utf8_fields: true to get utf8 encoded field names.
Get field metadata for template
Initialize the object with utf8_fields: true to get utf8 encoded field metadata.
applies each page of the stamp PDF to the corresponding page of the input PDF args: primary_file, stamp_file, output
pdftk.read "/path/to/form.pdf" returns an instance of PdfForms::Pdf representing the given template
stamp one pdf with another
args: primary_file, stamp_file, output