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
130
What is an API
jwo
0
190
DIY Rails Authentication
jwo
0
200
ActionCable - For Not Another Chat App
jwo
3
1.6k
SlackBot.rb - Create You a Slack Bot
jwo
1
1.4k
react-rails: an isomorphic match made in heaven
jwo
0
1.3k
Docker - next big thing
jwo
0
930
Ruby 2.1 Overview
jwo
0
950
Rails 4: Appetizers
jwo
1
960
Other Decks in Programming
See All in Programming
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.3k
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.9k
AIでLINEスタンプを作ってみた
eycjur
1
230
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
230
Flutter with Dart MCP: All You Need - 박제창 2025 I/O Extended Busan
itsmedreamwalker
0
150
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
510
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
400
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
610
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
440
Kiroで始めるAI-DLC
kaonash
2
610
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2.4k
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
340
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
2.8k
Speed Design
sergeychernyshev
32
1.1k
A designer walks into a library…
pauljervisheath
207
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
How to Ace a Technical Interview
jacobian
279
23k
Why Our Code Smells
bkeepers
PRO
339
57k
Agile that works and the tools we love
rasmusluckow
330
21k
A Tale of Four Properties
chriscoyier
160
23k
Statistics for Hackers
jakevdp
799
220k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Designing for humans not robots
tammielis
253
25k
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