Skip to content
 
 

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FillPDF

FillPDF is a golang library to easily fill PDF forms. This library uses the pdftk utility to fill the PDF forms with fdf data. Currently this library only supports PDF text and checkbox field values. Feel free to add support to more form types (Send pull request to original developer) This fork extends with some more pdftk commands

  • Multistamp
  • Ability to generate PDF's with special characters (with flatten) with pdftk. (Limited by font in PDF)

Documentation

Check the Documentation at GoDoc.org.

Sample

There is an example:

package main

import (
	"log"

	"github.com/phelian/fillpdf"
)

func main() {
	// Create the form values.
	form := fillpdf.Form{
		"field_1": "Hello",
		"field_2": "World",
		"field_3": "with special åäöéè",
	}

	// Fill the form PDF with our values.
	err := fillpdf.Fill(form, "form.pdf", "filled.pdf", "On", "Off", true)
	if err != nil {
		log.Fatal(err)
	}
}

Run the example as following:

cd sample
go build
./sample

About

FillPDF - Fill and multistamp PDF forms

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages