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.4k
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.5k
What I look for in a Junior Developer
rossta
2
1k
Progressive Web Apps on Rails
rossta
0
2.3k
Enumerable's Ugly Cousin - GORUCO Microtalk
rossta
0
390
Enumerator - Enumerable's Ugly Cousin
rossta
1
540
Recurring Events with Montrose
rossta
3
2k
Enumerable - How I Fell in Love with Ruby
rossta
20
4.7k
Create and Deploy an Ember App in 5 Minutes
rossta
7
3.7k
Other Decks in Programming
See All in Programming
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
480
CSC305 Lecture 11
javiergs
PRO
0
320
data-viz-talk-cz-2025
lcolladotor
0
110
ドメイン駆動設計のエッセンス
masuda220
PRO
15
7.3k
Node-REDのノードの開発・活用事例とコミュニティとの関わり(Node-RED Con Nagoya 2025)
404background
0
110
Kotlinで実装するCPU/GPU 「協調的」パフォーマンス管理
matuyuhi
0
240
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
5.9k
なんでRustの環境構築してないのにRust製のツールが動くの? / Why Do Rust-Based Tools Run Without a Rust Environment?
ssssota
14
47k
業務でAIを使いたい話
hnw
0
220
マンガアプリViewerの大画面対応を考える
kk__777
0
440
HTTPじゃ遅すぎる! SwitchBotを自作ハブで動かして学ぶBLE通信
occhi
0
140
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
246
12k
Balancing Empowerment & Direction
lara
5
710
Designing for Performance
lara
610
69k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Building Adaptive Systems
keathley
44
2.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
900
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
How STYLIGHT went responsive
nonsquared
100
5.9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.8k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.7k
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]