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
1.5k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by Ross Kaffenberger
See All by Ross Kaffenberger
A Webpack Survival Guide for Rails Developers
rossta
1
2.8k
What I look for in a Junior Developer
rossta
2
1.1k
Progressive Web Apps on Rails
rossta
0
2.4k
Enumerable's Ugly Cousin - GORUCO Microtalk
rossta
0
480
Enumerator - Enumerable's Ugly Cousin
rossta
1
600
Recurring Events with Montrose
rossta
3
2.1k
Enumerable - How I Fell in Love with Ruby
rossta
20
4.9k
Create and Deploy an Ember App in 5 Minutes
rossta
7
3.8k
Other Decks in Programming
See All in Programming
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
230
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
230
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
360
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
3
1.1k
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
220
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
350
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
350
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
130
源内ハンズオン概要編
hideg
0
200
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
5
500
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
5k
Android CLI
fornewid
0
230
Featured
See All Featured
Joys of Absence: A Defence of Solitary Play
codingconduct
1
440
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
390
Bash Introduction
62gerente
615
220k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
510
Typedesign – Prime Four
hannesfritz
42
3.1k
Faster Mobile Websites
deanohume
310
32k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
570
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]