Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Wicked PDF - Essential Rails Gems
Search
Jesse Wolgamott
April 10, 2013
Programming
4
460
Wicked PDF - Essential Rails Gems
PDF Creation that Doesn't Suck
Jesse Wolgamott
April 10, 2013
Tweet
Share
More Decks by Jesse Wolgamott
See All by Jesse Wolgamott
React vs React-Native
jwo
0
120
What is an API
jwo
0
180
DIY Rails Authentication
jwo
0
190
ActionCable - For Not Another Chat App
jwo
3
1.6k
SlackBot.rb - Create You a Slack Bot
jwo
1
1.3k
react-rails: an isomorphic match made in heaven
jwo
0
1.3k
Docker - next big thing
jwo
0
920
Ruby 2.1 Overview
jwo
0
930
Rails 4: Appetizers
jwo
1
950
Other Decks in Programming
See All in Programming
Quand Symfony, ApiPlatform, OpenAI et LangChain s'allient pour exploiter vos PDF : de la théorie à la production…
ahmedbhs123
0
190
スタートアップの急成長を支えるプラットフォームエンジニアリングと組織戦略
sutochin26
1
5.6k
AI駆動のマルチエージェントによる業務フロー自動化の設計と実践
h_okkah
0
150
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
760
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
290
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
390
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
820
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
650
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
130
チームで開発し事業を加速するための"良い"設計の考え方 @ サポーターズCoLab 2025-07-08
agatan
1
420
ソフトウェア品質を数字で捉える技術。事業成長を支えるシステム品質の マネジメント
takuya542
1
13k
XP, Testing and ninja testing
m_seki
3
240
Featured
See All Featured
Practical Orchestrator
shlominoach
189
11k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Speed Design
sergeychernyshev
32
1k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Thoughts on Productivity
jonyablonski
69
4.7k
Testing 201, or: Great Expectations
jmmastey
43
7.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
The Invisible Side of Design
smashingmag
301
51k
How GitHub (no longer) Works
holman
314
140k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Transcript
WICKED PDF Essential Rails Gems by @jwo for @houstonrb Tuesday,
April 9, 13
PDF Creation that doesn’t suck Prawn Prince PDF Pdfkit Rtek
(latex) DocRaptor acts_as_flying_saucer Tuesday, April 9, 13
Why Wicked PDF Great API Uses HTML/CSS you’re used to
Can use javascript in your PDFs Tuesday, April 9, 13
Bad Parts Difficult to render outside of Rails Request (Though
not impossible, see codebase at end) The Binary is hard to get configured to be found Tuesday, April 9, 13
Rails 4? Does not work for CSS/JS at time of
creation :( Tuesday, April 9, 13
Install gem install wicked_pdf Tuesday, April 9, 13
Development group :development do gem "wkhtmltopdf-binary" end Tuesday, April 9,
13
Production group :production do gem 'wkhtmltopdf-heroku' end Tuesday, April 9,
13
Recommended Workflow Create the PDF monthly Save PDF to S3
in CarrierWave Send link to download file Tuesday, April 9, 13
Hints Have a report.scss that includes parts you need to
include Have a report.js that includes parts asset_sync is your friend Easiest to render partials Tuesday, April 9, 13
Saving PDFs (CarrierWave) pdf = RendersPdf .new("statement/_show", {as_of_date: Date.today} )
.render account.account_statement.store!(pdf) Tuesday, April 9, 13
Must Do’s Add “application/pdf”, :pdf to MimeTypes respond_to do |format|
format.html format.pdf do render :pdf => "file_name", layout: 'report.html', "javascript-delay" => 5000 end end Tuesday, April 9, 13
Example Tuesday, April 9, 13
What did we just see? Using Bootstrap in your PDFs
Using Morris.js to graph in your PDFs Tuesday, April 9, 13
Codebase https://github.com/jwo/railsdotpdf http://railsdotpdf.herokuapp.com/ Tuesday, April 9, 13