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
450
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
110
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
910
Ruby 2.1 Overview
jwo
0
920
Rails 4: Appetizers
jwo
1
940
Other Decks in Programming
See All in Programming
A comprehensive view of refactoring
marabesi
0
320
エラーって何種類あるの?
kajitack
5
140
データベースコネクションプール(DBCP)の変遷と理解
fujikawa8
1
250
Go Modules: From Basics to Beyond / Go Modulesの基本とその先へ
kuro_kurorrr
0
110
複数アプリケーションを育てていくための共通化戦略
irof
10
3.8k
アンドパッドの Go 勉強会「 gopher 会」とその内容の紹介
andpad
0
190
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
2
490
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
110
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
240
iOSアプリ開発で 関数型プログラミングを実現する The Composable Architectureの紹介
yimajo
2
210
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
260
コードに語らせよう――自己ドキュメント化が内包する楽しさについて / Let the Code Speak
nrslib
6
1.4k
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
329
21k
Stop Working from a Prison Cell
hatefulcrawdad
269
20k
Adopting Sorbet at Scale
ufuk
77
9.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
We Have a Design System, Now What?
morganepeng
52
7.6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
650
What's in a price? How to price your products and services
michaelherold
245
12k
Rails Girls Zürich Keynote
gr2m
94
14k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Producing Creativity
orderedlist
PRO
346
40k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
How to Ace a Technical Interview
jacobian
276
23k
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