<div>I haven't done much with PDFs, but for the little I have done I've used Prawn. It is a low-level library, but it's really quick and easy to wrap your head around it. I got a multi-page PDF with cutting margins for tickets each with unique serial numbers and a bunch of instructions done in 2 hours a few years ago.</div><div><br></div><div>As for your issue, it sounds like you need to commit a long piece of text/article to the PDF. The only problem I foresee is if the text is free-form, it could get tricky to figure out when a paragraph doesn't fit on current page and needs to move to the next. In which case a HTML to PDF converter might be a better choice, hopefully without too much headache from getting it to parse/render the HTML/CSS the way you want.</div><div><br></div><div></my-two-cents></div>
                <div><div><br></div><div><font face="Helvetica"><br></font></div><div><font face="Helvetica">-jimeh</font></div><div><br></div></div>
                 
                <p style="color: #A0A0A8;">On Tuesday, 12 February 2013 at 16:46, Hakan Şenol Ensari wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div><div dir="ltr">If you simply need to lay out several pages with some images and text, you have no reason not to use Prawn.<div><br><br><div>On 12 February 2013 16:36, Andy Olliver <span dir="ltr"><<a href="mailto:andy.olliver@artirix.com" target="_blank">andy.olliver@artirix.com</a>></span> wrote:<br><blockquote type="cite"><div><div dir="ltr">Luke<div>Just seen your post re not using HTML - so wicked_pdf gem is not so good for you.<div>Apache FOP (<a href="http://xmlgraphics.apache.org/fop/" target="_blank">http://xmlgraphics.apache.org/fop/</a>)  works well to create PDF's using the XSL-FO spec - this is java, but can be called from shell, so can be used from a Rails app. Create XML for content data, and pass to formatting engine with reference to appropriate templates.</div>



</div><div>One of the issues I've experienced with PDF creation is the issue of text size, white-space, page-breaks etc.. It can be quite a challenge to come up with a graphic design that flows, and can accommodate variable content length while using a fixed page size. I've seen ways of adding conditional formatting to PDF's using Adobe tools and embedded scripting in layout templates, and then almost anything is possible..</div>



</div><div><div><div><br><br><div>On 12 February 2013 16:12, Andy Olliver <span dir="ltr"><<a href="mailto:andy.olliver@artirix.com" target="_blank">andy.olliver@artirix.com</a>></span> wrote:<br><blockquote type="cite"><div><div dir="ltr">I've just done some work using <span style="font-family:arial,sans-serif;font-size:13px">wicked_pdf gem - this worked well for us.</span><div>



<span style="font-family:arial,sans-serif;font-size:13px">Be very careful regarding capacity planning when adding something like this into a Rails web-app - long running requests are bad news. For anything other than v.low request rate, consider adding a worker Q, with client polling for success / fail / timeout etc.</span></div>




</div><div><div><div><br><br><div>On 12 February 2013 15:18, Richard Livsey <span dir="ltr"><<a href="mailto:richard@livsey.org" target="_blank">richard@livsey.org</a>></span> wrote:<br><blockquote type="cite"><div>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>
<a href="tel:%2B44%20%280%29%207841%20260%20797" value="+447841260797" target="_blank">+44 (0) 7841 260 797</a><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>)> 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>
</div>> > 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>





<div><div>> ><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>
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></div></blockquote></div><br></div>
</div></div></div></blockquote></div><br></div>
</div></div><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>
<br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><em style="line-height:16px;font-style:normal;font-family:arial,sans-serif"><br></em></div><em style="line-height:16px;font-style:normal;font-family:arial,sans-serif">Sent from my iPhone</em>
</div></div>
</div><div><div>_______________________________________________</div><div>Chat mailing list</div><div><a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a></div><div><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>