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.2k
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
940
Progressive Web Apps on Rails
rossta
0
2.2k
Enumerable's Ugly Cousin - GORUCO Microtalk
rossta
0
300
Enumerator - Enumerable's Ugly Cousin
rossta
1
440
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
GoのIteratorに詳しくなってしまう
inatonix
1
210
AndroidアプリのUIバリエーションをあの手この手で確認する / Check UI variations of Android apps by various means
tkmnzm
1
200
Regular Expressions, REXML, Automata Learning
makenowjust
0
220
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
9
2.4k
GraphQL あるいは React における自律的なデータ取得について
quramy
11
3k
Rubyとクリエイティブコーディングの輪の広がり / The Growing Circle of Ruby and Creative Coding
chobishiba
1
270
マルチモジュールにおけるテスト最適化
fxwx23
0
210
rails_girls_is_my_gate_to_join_the_ruby_commuinty
maimux2x
0
200
状態管理ライブラリZustandの導入から運用まで
k1tikurisu
3
470
【TID2024】模擬講義:プログラマと一緒にゲームをデザインしてみよう!
akatsukigames_tech
0
680
Why Prism?
kddnewton
4
1.7k
Securify_エンジニア採用資料
3shake
0
110
Featured
See All Featured
Designing for humans not robots
tammielis
248
25k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
24
610
Building Your Own Lightsaber
phodgson
101
6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
278
13k
Atom: Resistance is Futile
akmur
261
25k
Into the Great Unknown - MozCon
thekraken
29
1.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
30
2.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
89
16k
Agile that works and the tools we love
rasmusluckow
327
20k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
3.9k
Ruby is Unlike a Banana
tanoku
96
11k
WebSockets: Embracing the real-time Web
robhawkes
59
7.3k
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]