Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
fill text and images through acroform fields
Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
data
examples
lib
.gitignore
Gemfile
README.md
Rakefile
prawn-fillform.gemspec

README.md

Prawn/Fillform: Fill Text and Images through Acroform Fields

Install

$ gem install prawn-fillform

Usage

Create a PDF form with Scribus, Adobe Products or something else. I have only tested this with Scribus. Currently only text fields and buttons are supported. Buttons are replaced by images.

require 'prawn-fillform'

data = {}
data[:page_1] = {}
data[:page_1][:firstname] = { :value => "Max" }
data[:page_1][:lastname] = { :value => "Mustermann" }
data[:page_1][:photo] = { :value => "test.jpg" }

# Create a PDF file with predefined data Fields
Prawn::Document.generate "output.pdf", :template => "template.pdf"  do |pdf|
  pdf.fill_form_with(data)
end

Take a look in examples folder

Something went wrong with that request. Please try again.