Created
January 17, 2018 03:44
-
-
Save gxespino/6f880d57be97c4ed368e9c8a82baf5a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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