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
Getting Lazy with Vue and PDFs
Search
Ross Kaffenberger
January 16, 2019
Programming
2
1.3k
Getting Lazy with Vue and PDFs
I share the most important lessons learned while building a PDF Viewer in Vue.
Ross Kaffenberger
January 16, 2019
Tweet
Share
More Decks by Ross Kaffenberger
See All by Ross Kaffenberger
A Webpack Survival Guide for Rails Developers
rossta
1
2.2k
What I look for in a Junior Developer
rossta
2
950
Progressive Web Apps on Rails
rossta
0
2.2k
Enumerable's Ugly Cousin - GORUCO Microtalk
rossta
0
320
Enumerator - Enumerable's Ugly Cousin
rossta
1
460
Recurring Events with Montrose
rossta
3
1.8k
Enumerable - How I Fell in Love with Ruby
rossta
20
4.5k
Create and Deploy an Ember App in 5 Minutes
rossta
7
3.6k
Other Decks in Programming
See All in Programming
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
560
Beyond ORM
77web
7
1k
良いユニットテストを書こう
mototakatsu
8
2.9k
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
280
Security_for_introducing_eBPF
kentatada
0
110
MCP with Cloudflare Workers
yusukebe
2
220
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
140
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
103 Early Hints
sugi_0000
1
240
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
260
ドメインイベント増えすぎ問題
h0r15h0
2
370
命名をリントする
chiroruxx
1
420
Featured
See All Featured
Six Lessons from altMBA
skipperchong
27
3.5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Making Projects Easy
brettharned
116
5.9k
Unsuck your backbone
ammeep
669
57k
Navigating Team Friction
lara
183
15k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Done Done
chrislema
181
16k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
520
Rails Girls Zürich Keynote
gr2m
94
13k
A Philosophy of Restraint
colly
203
16k
Transcript
Ross Kaffenberger @rossta Getting Lazy with Vue and PDFs
Ross Kaffenberger @rossta Building a PDF Vue-er
#dadjokes
None
• ross kaffenberger @rossta
rossta.net/vue-pdfjs-demo
None
PDF.js fetching
None
PDF.js rendering
None
PDF.js in Vue
None
None
Problem: Large PDFs
•Lazy render: draw to canvas when visible •“Infinite” scroll: fetch
pages in batches
Iteration #1: Math!
None
None
None
None
None
None
None
None
Problem: Vue cannot watch $el properties
Manual work
None
None
None
None
Next iteration:
IntersectionObserver!
None
None
Advantages
•no $el property tracking •less code, fewer bugs •easier to
extend
Akryum/vue-observe-visibility
Lesson: Opt for Vue-friendliness
None
Lesson: Be curious and flexible
rossta/vue-pdfjs-demo
@rossta rossta.net/talks
[email protected]