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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ross Kaffenberger
January 16, 2019
Programming
1.5k
2
Share
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.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
570
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.8k
Other Decks in Programming
See All in Programming
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
130
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
890
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
3
270
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
370
Getting more out of Maven
mlvandijk
0
110
Server-Side Kotlin LT大会 vol.18 [Kotlin-lspの最新情報と Neovimのlsp設定例]
yasunori0418
1
130
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
1
330
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
780
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.9k
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.9k
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
210
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
180
How to train your dragon (web standard)
notwaldorf
97
6.6k
HDC tutorial
michielstock
2
620
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
320
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
170
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
The untapped power of vector embeddings
frankvandijk
2
1.7k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
220
Unsuck your backbone
ammeep
672
58k
Site-Speed That Sticks
csswizardry
13
1.2k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
260
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]