Skip to content
A ruby interface to pdftk
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/pdf Convert ends_with to a regexp test. Jul 11, 2014
test Best effort date parsing Feb 3, 2012
.gitignore
CHANGELOG.md Add a changelog and log recent contributions Jul 11, 2014
Gemfile Avoid deprecated rubygems source. Jul 11, 2014
Gemfile.lock Avoid deprecated rubygems source. Jul 11, 2014
LICENSE.md Update documentation a bit Feb 8, 2012
README.md
Rakefile Follow ruby require conventions Feb 2, 2012
pdf-toolkit.gemspec Remove LICENCE.md from gemspec, as it fails to build Feb 8, 2012

README.md

pdf-toolkit - A ruby interface to pdftk

pdf-toolkit allows you to access pdf metadata in read-write in a very simple way, through the pdftk commandline tool.

A typical usecase is as follows:

my_pdf = PDF::Toolkit.open("somefile.pdf")
my_pdf.updated_at = Time.now # ModDate
my_pdf["SomeAttribute"] = "Some value"
my_pdf.save!

class MyDocument < PDF::Toolkit
  info_accessor :some_attribute
  def before_save
    self.updated_at = Time.now
  end
end
my_pdf = MyDocument.open("somefile.pdf")
my_pdf.some_attribute = "Some value"
my_pdf.save!

Note about this version

Starting with version 1.1.0, PDFTK version 2.0 is strongly recommended. Feel free to report problems on earlier versions if you think it's worth it, though.

Contributors

  • Tim Pope is the original author of pdf-toolkit
  • Preston Marshall ported the project to github
  • Bernard Lambeau is the current maintainer
  • James Prior made small changes for PDFtk Server 2.0

Please report issues on github

Licence

pdf-toolkit is released under a MIT licence. See LICENCE.md

You can’t perform that action at this time.