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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ross Kaffenberger
January 16, 2019
Programming
2
1.5k
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.7k
What I look for in a Junior Developer
rossta
2
1.1k
Progressive Web Apps on Rails
rossta
0
2.3k
Enumerable's Ugly Cousin - GORUCO Microtalk
rossta
0
430
Enumerator - Enumerable's Ugly Cousin
rossta
1
550
Recurring Events with Montrose
rossta
3
2.1k
Enumerable - How I Fell in Love with Ruby
rossta
20
4.8k
Create and Deploy an Ember App in 5 Minutes
rossta
7
3.7k
Other Decks in Programming
See All in Programming
15年目のiOSアプリを1から作り直す技術
teakun
1
600
Event Storming
hschwentner
3
1.3k
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
250
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
160
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
560
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
160
TipKitTips
ktcryomm
0
150
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
240
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
160
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
1
130
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
410
Codex の「自走力」を高める
yorifuji
0
710
Featured
See All Featured
A Soul's Torment
seathinner
5
2.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
We Are The Robots
honzajavorek
0
190
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
200
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
190
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Fireside Chat
paigeccino
42
3.8k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
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]