Templates not working

205 views
Skip to first unread message

acras

unread,
Jan 25, 2011, 6:27:55 AM1/25/11
to Prawn
Hi,

I´m trying this 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 is a template.pdf file in the same dir as the script but the
output.pdf comes only with the Hello Wordl

Is there anything else that I should be concerned of?

Thanks

Daniel Nelson

unread,
Jan 25, 2011, 8:26:52 AM1/25/11
to prawn...@googlegroups.com
On Tue, Jan 25, 2011 at 5:27 AM, acras <ricard...@gmail.com> wrote:
> 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 is a template.pdf file in the same dir as the script but the
> output.pdf comes only with the Hello Wordl

What version of Prawn are you using?

-Daniel

acras

unread,
Jan 25, 2011, 8:50:21 AM1/25/11
to Prawn
sorry about that

0.8.4 under Windows.

Ricardo


On Jan 25, 11:26 am, Daniel Nelson <dnelso...@gmail.com> wrote:

Daniel Nelson

unread,
Jan 25, 2011, 10:10:02 AM1/25/11
to prawn...@googlegroups.com
On Tue, Jan 25, 2011 at 7:50 AM, acras <ricard...@gmail.com> wrote:
> 0.8.4 under Windows.

Templates weren't merged until 0.10.1.

-Daniel

Reply all
Reply to author
Forward
0 new messages