<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Mark,
<div class=""><br class="">
</div>
<div class="">Been following this with interest.</div>
<div class=""><br class="">
</div>
<div class="">I wanted to know what you found to be the shortcomings of WickedPDF? I’m using it in a side project at the moment and haven’t had any issues, but then maybe I’ve not pushed it to its limits as much as you...</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Charlie</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 2 Aug 2017, at 09:17, Mark Burns <<a href="mailto:markthedeveloper@gmail.com" class="">markthedeveloper@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
Thanks all for the interesting ideas.
<div class=""><br class="">
</div>
<div class="">Jay, I like the idea of using flying saucer. Not sure about the implementation of<span class="Apple-converted-space"> </span><a href="https://github.com/amardaxini/acts_as_flying_saucer" class="">https://github.com/amardaxini/acts_as_flying_saucer</a><span class="Apple-converted-space"> </span>if
 that's what you mean.<span class="Apple-converted-space"> </span><a href="https://github.com/crispymtn/flying_ruby_saucer" class="">https://github.com/crispymtn/flying_ruby_saucer</a> looks a bit nicer.</div>
<div class=""><br class="">
</div>
<div class="">Roland, I think you were correct about it not being the right fit. Still an interesting idea worth knowing about.</div>
<div class=""><br class="">
</div>
<div class="">Sam, that could work in tandem with the flying saucer approach.</div>
<div class="">I've probably invested a bit too much time to want to jump back to generating HTML. My first attempt was using wicked_pdf and the underlying renderer didn't support some of the things I needed to do.</div>
<div class=""><br class="">
</div>
<div class="">Josh, I'm probably going to go with an approach like this maybe using some of either Gerhard or Craig's ideas. <br class="">
I think for me focusing on being able to generate individual components as an entire pdf which I can diff against would be useful.<span class="Apple-converted-space"> </span><br class="">
Possibly using diff-pdf in an iterative fashion until finding the problematic pages, then components, then doing a visual diff on those.</div>
</div>
<br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<div dir="ltr" class="">On Wed, Aug 2, 2017 at 7:52 AM Jay Caines-Gooby <<a href="mailto:jay@gooby.org" class="">jay@gooby.org</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr" class="">We use acts-as-flying-saucer - it generates pdfs from erb & css, so rather than testing the pdf itself, you could test the generated xhtml that creates the pdfs...</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote"></div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">On 1 August 2017 at 20:00, Mark Burns<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:markthedeveloper@gmail.com" target="_blank" class="">markthedeveloper@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class="">
</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr" class="">Has anyone any recommendations or suggestions for testing PDF generation?
<div class=""><br class="">
</div>
<div class="">I'm working on a side project and using Prawn. Which is great. I can programmatically generate large aspects of the content I want.</div>
<div class=""><br class="">
</div>
<div class="">But so far I've been tweaking then looking at the result in the browser.</div>
<div class="">It's not an absolute nightmare - a few seconds to render. But it's hard to know whether the result is working without actually looking at it.</div>
<div class=""><br class="">
</div>
<div class="">The DSL is nice, but very imperative. Mocking method calls out would be insane.</div>
<div class=""><br class="">
</div>
<div class="">I'm managing to refactor into small objects to represent the components and layout, pages, typography aspects etc of the document. Which brings the complexity back down to manageable chunks.<span class="Apple-converted-space"> </span><br class="">
<br class="">
But ultimately everything just calls underlying prawn DSL methods. So I can test little bits of logic that I have in my objects, but ultimately whether it works or not comes down to "have a look and see".</div>
<div class=""><br class="">
</div>
<div class="">Perhaps the best I can hope for is screenshotting when I'm happy and using approvals to verify each major change hasn't radically borked everything.</div>
<div class=""><br class="">
</div>
<div class="">It seems like there are tools to test which strings get into the document, but that seems like the easiest part. And probably the only part I'd be happy with test doubles for prawn and setting expectations on the text generating methods.</div>
</div>
<br class="">
</blockquote>
</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">
_______________________________________________<br class="">
Chat mailing list<br class="">
<a href="mailto:Chat@lists.lrug.org" target="_blank" class="">Chat@lists.lrug.org</a><br class="">
Archives:<span class="Apple-converted-space"> </span><a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank" class="">http://lists.lrug.org/pipermail/chat-lrug.org</a><br class="">
Manage your subscription:<span class="Apple-converted-space"> </span><a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank" class="">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br class="">
List info:<span class="Apple-converted-space"> </span><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank" class="">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br class="">
<br class="">
</blockquote>
</div>
</div>
<div class="gmail_extra"><br class="">
<br clear="all" class="">
<div class=""><br class="">
</div>
--<span class="Apple-converted-space"> </span><br class="">
<div class="m_3562339495125174998gmail_signature" data-smartmail="gmail_signature">
Jay Caines-Gooby<br class="">
<a href="http://jay.gooby.org/" target="_blank" class="">http://jay.gooby.org</a><br class="">
<a href="mailto:jay@gooby.org" target="_blank" class="">jay@gooby.org</a><br class="">
<a href="tel:+44%207956%20182625" value="+447956182625" target="_blank" class="">+44 (0)7956 182625</a><br class="">
twitter, skype & aim: jaygooby<br class="">
gtalk:<span class="Apple-converted-space"> </span><a href="mailto:jaygooby@gmail.com" target="_blank" class="">jaygooby@gmail.com</a><br class="">
</div>
</div>
_______________________________________________<br class="">
Chat mailing list<br class="">
<a href="mailto:Chat@lists.lrug.org" target="_blank" class="">Chat@lists.lrug.org</a><br class="">
Archives:<span class="Apple-converted-space"> </span><a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank" class="">http://lists.lrug.org/pipermail/chat-lrug.org</a><br class="">
Manage your subscription:<span class="Apple-converted-space"> </span><a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank" class="">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br class="">
List info:<span class="Apple-converted-space"> </span><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank" class="">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br class="">
</blockquote>
</div>
<br clear="both" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">______________________________________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">This
 email has been scanned by the Symantec Email Security.cloud service.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">For
 more information please visit <a href="http://www.symanteccloud.com" class="">http://www.symanteccloud.com</a></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">______________________________________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Chat
 mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><a href="mailto:Chat@lists.lrug.org" class="">Chat@lists.lrug.org</a></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Archives:
<a href="http://lists.lrug.org/pipermail/chat-lrug.org" class="">http://lists.lrug.org/pipermail/chat-lrug.org</a></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Manage
 your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" class="">
http://lists.lrug.org/options.cgi/chat-lrug.org</a></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">List
 info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" class="">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a></span></div>
</blockquote>
</div>
<br class="">
</div>
<br clear="both">
______________________________________________________________________<BR>
This email has been scanned by the Symantec Email Security.cloud service.<BR>
For more information please visit http://www.symanteccloud.com<BR>
______________________________________________________________________<BR>
</body>
</html>