Nice write up... I think one thing to keep in mind is that generating a PDF this way is great but is making a browser based request - so it's good to avoid doing this within the scope of an existing request. When possible, put the generation into a background queue and email the results or poll for the result... At least if your in unicorn rails stack