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
1.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
Atomics APIを知る / Understanding Atomics API
ssssota
1
160
しっかり学ぶ java.lang.*
nagise
1
410
オフライン対応!Flutterアプリに全文検索エンジンを実装する @FlutterKaigi2025
itsmedreamwalker
2
240
AI駆動開発ライフサイクル(AI-DLC)のホワイトペーパーを解説
swxhariu5
0
1.2k
予防に勝る防御なし(2025年版) - 堅牢なコードを導く様々な設計のヒント / Growing Reliable Code PHP Conference Fukuoka 2025
twada
PRO
39
13k
問題の見方を変える「システム思考」超入門
panda_program
0
300
Amazon Bedrock Knowledge Bases Hands-on
konny0311
0
150
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
20
13k
ゼロダウンタイムでミドルウェアの バージョンアップを実現した手法と課題
wind111
0
210
Tangible Code
chobishiba
3
690
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
160
CSC509 Lecture 13
javiergs
PRO
0
260
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
GraphQLとの向き合い方2022年版
quramy
49
14k
KATA
mclloyd
PRO
32
15k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Git: the NoSQL Database
bkeepers
PRO
432
66k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Into the Great Unknown - MozCon
thekraken
40
2.2k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Mobile First: as difficult as doing things right
swwweet
225
10k
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]