ruby - Prawn templates not working -
i´m trying simple script:
require 'prawn' template_file_name = file.join(file.dirname(__file__), 'template.pdf') pdf_file = prawn::document.new(:template => template_file_name) pdf_file.text('hello world') pdf_file.render_file('output.pdf')
there template.pdf file in same dir script output.pdf comes hello wordl
is there else should concerned of?
thanks
if want stamp pdf file another, , using ubuntu, try installing pdftk.
go terminal , type this:
sudo apt-get install pdftk
then go pdf directory , type:
pdftk content.pdf stamp template.pdf output final.pdf
if want within ruby, can learn about: calling shell commands ruby
i read solution in link: http://numbers.brighterplanet.com/2011/10/06/stamp-pdfs-with-prawn-and-pdftk/
Comments
Post a Comment