class Merlot::Stamper
Constants
- FOOTER_PDF
Public Class Methods
stamp(string, file_location, save_location)
click to toggle source
-
Create a blank template with the <string> stamp on the bottom of the page
-
Call pdftk with the arguments :
<attachment file name> pdf file, stamp, blank_template.pdf, output, <output-folder>/<attachment file name>.pdf
This will stamp the given string on every page of the pdf file
# File lib/merlot.rb, line 17 def self.stamp(string, file_location, save_location) create_footer(string) stamp_all_pages(file_location, save_location) end
Private Class Methods
stamp_all_pages(file_location, save_location)
click to toggle source
# File lib/merlot.rb, line 33 def self.stamp_all_pages(file_location, save_location) POSIX::Spawn::Child.new 'pdftk', file_location, 'stamp', FOOTER_PDF, 'output', save_location end