Skip to content

Instantly share code, notes, and snippets.

@gxespino
Created Jan 17, 2018
Embed
What would you like to do?
require 'pdf_forms'
require 'cliver'
input_data = {
ssn: '123-23-1234',
birthday: '02/14/1980',
color: 'Excella Red',
first_name: 'John Smith'
}
@pdftk = PdfForms.new(Cliver.detect('pdftk'))
fill_values = {}
fill_values['ssn'] = input_data[:ssn]
fill_values['birthday'] = input_data[:birthday]
fill_values['color'] = input_data[:color]
fill_values['first name'] = input_data[:first_name]
@pdftk.fill_form './Fillable.pdf', 'dynamic.pdf', fill_values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment