<div dir="ltr"><div style>Hey Luke,</div><div style><br></div>I'd say if you need such a lengthy template, without much data replacement needed, definitely have a look at rtex and LaTeX. I've worked for a company that was very happy in using LaTeX for business proposals, and have built them a toolchain to generate new versions using rtex in a sinatra app.<div>
<br></div><div style>Worth mentioning too if resorting to Java is an option; JasperReports makes it really easy to generate data-driven reports, but it's more for table-ish style reporting IMO, not the lengthy documents you spoke about.</div>
<div style><br></div><div style>Cheers,</div><div style><br></div><div style>Alex</div></div><div class="gmail_extra"><br clear="all"><div>Alexandre M. Reis<br><a href="http://alexmreis.com" target="_blank">http://alexmreis.com</a><br>
+32 484 77 99 27</div>
<br><br><div class="gmail_quote">On Tue, Feb 12, 2013 at 4:41 PM, David Burrows <span dir="ltr"><<a href="mailto:david@designsuperbuild.com" target="_blank">david@designsuperbuild.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">PDFKit does headers/footers, more info here <a href="http://metaskills.net/2011/03/20/pdfkit-overview-and-advanced-usage/" target="_blank">http://metaskills.net/2011/03/20/pdfkit-overview-and-advanced-usage/</a></div>
<div class="gmail_extra"><span class="HOEnZb"><font color="#888888">
<br clear="all"><div><div>-- </div><div>David Burrows</div><div>079 1234 2125</div><div>@dburrows</div><div><br></div><div><a href="http://www.designsuperbuild.com/" target="_blank">http://www.designsuperbuild.com/</a> | @dsgnsprbld</div>

</div></font></span><div><div class="h5">
<br><br><div class="gmail_quote">On Tue, Feb 12, 2013 at 3:39 PM, Richard Livsey <span dir="ltr"><<a href="mailto:richard@livsey.org" target="_blank">richard@livsey.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I can't speak for PDFKit/wkhtmltopdf, but Flying Saucer supports pagination and page numbering etc…<br>
<br>
You can use all the page-break properties in CSS:<br>
<a href="http://flyingsaucerproject.github.com/flyingsaucer/r8/guide/users-guide-R8.html#xil_37" target="_blank">http://flyingsaucerproject.github.com/flyingsaucer/r8/guide/users-guide-R8.html#xil_37</a><br>
<br>
It supports the paged media CSS3 module so you can do stuff like<br>
<br>
@page {<br>
  @top-right { content: "Page " counter(page); }<br>
<br>
}<br>
<br>
<br>
More detail on that can be found here:<br>
<a href="http://www.w3.org/TR/css3-page/#margin-boxes" target="_blank">http://www.w3.org/TR/css3-page/#margin-boxes</a><br>
<br>
Cheers.<br>
<div><br>
<br>
On Tuesday, 12 February 2013 at 15:28, Luke Saunders wrote:<br>
<br>
> Hi all<br>
><br>
> Thanks for the suggestions. In my case I assume it's not an option to go via HTML as there is not really a concept of pages in HTML. So things like a separate title page, repeated headers, page numbers etc would be tricky right?<br>


><br>
> Cheers,<br>
> Luke<br>
><br>
</div><div>> On Tue, Feb 12, 2013 at 3:18 PM, Richard Livsey <<a href="mailto:richard@livsey.org" target="_blank">richard@livsey.org</a> (mailto:<a href="mailto:richard@livsey.org" target="_blank">richard@livsey.org</a>)> wrote:<br>


> > I've had good results with using Flying Saucer - <a href="https://code.google.com/p/flying-saucer" target="_blank">https://code.google.com/p/flying-saucer</a><br>
> ><br>
> > It's Java, but easy to use with JRuby or just make a standalone executable and call out to that to generate PDFs from HTML & CSS.<br>
> > I found it much better than wkhtmltopdf for the kind of PDFs I was generating, but probably worth giving PDFKit a try first to see if that suits your needs.<br>
> ><br>
> > Cheers.<br>
> ><br>
> > --<br>
> > Richard Livsey<br>
> > Co-Founder, MinuteBase<br>
> > Meeting collaboration made easy<br>
> > <a href="http://minutebase.com" target="_blank">http://minutebase.com</a><br>
</div>> > <a href="tel:%2B44%20%280%29%207841%20260%20797" value="+447841260797" target="_blank">+44 (0) 7841 260 797</a> (tel:%2B44%20%280%29%207841%20260%20797)<br>
<div>> ><br>
> ><br>
> > On Tuesday, 12 February 2013 at 15:12, Mooktakim Ahmed wrote:<br>
> ><br>
> > > Hey,<br>
> > ><br>
> > > Recently i have used <a href="https://github.com/pdfkit/PDFKit" target="_blank">https://github.com/pdfkit/PDFKit</a>. One good thing about it is that you can set it up as a middleware which translates HTML into PDF just by going to the .pdf extension.<br>


> > > It might not be good fit for you. But for me, it was a nice way to quickly get PDF generation working, without adding too much messy code. Especially good if you need to convert HTML to PDF.<br>
> > ><br>
> > ><br>
> > ><br>
> > > Regards,<br>
> > > Mooktakim Ahmed<br>
> > ><br>
</div><div>> > > On 12 February 2013 15:06, Luke Saunders <<a href="mailto:luke@sketchconsulting.com" target="_blank">luke@sketchconsulting.com</a> (mailto:<a href="mailto:luke@sketchconsulting.com" target="_blank">luke@sketchconsulting.com</a>) (mailto:<a href="mailto:luke@sketchconsulting.com" target="_blank">luke@sketchconsulting.com</a>)> wrote:<br>


> > > > Hi LRUG<br>
> > > ><br>
> > > > Can anyone with recent experience in this recommend the best tool to use in order to generate a PDF from a Ruby (Rails) app?<br>
> > > ><br>
> > > > Said PDF will be an A4 document, with a title page, followed by 5-10 content pages each with a standard header / footer including page numbers. Content pages consist of headings and paragraphs, along with some embedded images.<br>


> > > ><br>
> > > > I used prawn (<a href="https://github.com/prawnpdf/prawn" target="_blank">https://github.com/prawnpdf/prawn</a>) once to generate a business card sized PDF and that was fine, but I'm wondering if perhaps a markup, maybe like LaTeX would be wise to generate this kind of doc.<br>


> > > ><br>
> > > > Keen to make the right choice and I think making the wrong choice could eat a lot of time here.<br>
> > > ><br>
> > > > Thanks!<br>
> > > > Luke.<br>
> > ><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Chat mailing list<br>
</div>> > <a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a> (mailto:<a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a>)<br>
> > <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<div><div>><br>
<br>
<br>
<br>
_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</div></div></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div>