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
Hack Claude Code with Claude Code
choplin
4
2k
スタートアップの急成長を支えるプラットフォームエンジニアリングと組織戦略
sutochin26
1
5.6k
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
780
Startups on Rails in Past, Present and Future–Irina Nazarova, RailsConf 2025
irinanazarova
0
100
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
760
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
2
640
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
250
MDN Web Docs に日本語翻訳でコントリビュートしたくなる
ohmori_yusuke
1
120
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
1
440
10 Costly Database Performance Mistakes (And How To Fix Them)
andyatkinson
0
330
git worktree × Claude Code × MCP ~生成AI時代の並列開発フロー~
hisuzuya
1
570
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
130
Featured
See All Featured
The Language of Interfaces
destraynor
158
25k
The Invisible Side of Design
smashingmag
301
51k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
740
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Practical Orchestrator
shlominoach
189
11k
Speed Design
sergeychernyshev
32
1k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
RailsConf 2023
tenderlove
30
1.1k
Embracing the Ebb and Flow
colly
86
4.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
How to Think Like a Performance Engineer
csswizardry
25
1.7k
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