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.1k
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.1k
What I look for in a Junior Developer
rossta
2
900
Progressive Web Apps on Rails
rossta
0
2.1k
Enumerable's Ugly Cousin - GORUCO Microtalk
rossta
0
280
Enumerator - Enumerable's Ugly Cousin
rossta
1
410
Recurring Events with Montrose
rossta
3
1.6k
Enumerable - How I Fell in Love with Ruby
rossta
20
4.4k
Create and Deploy an Ember App in 5 Minutes
rossta
7
3.6k
Other Decks in Programming
See All in Programming
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
コードレビューで学ぶ!Kotlinオブジェクト指向デザインパターン
akkie76
2
180
受託開発でGitLab CI を活用していく
xiombatsg
1
270
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
430
GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection
izumin5210
4
330
Java 22 Overview
kishida
1
170
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
130
try! Swift Tokyo 初参加報告LT
hinakko2
0
190
オブジェクト指向のリ・オリエンテーション~歴史を振り返り、AI時代に向きなおる~
hanyudaeiiti
10
5.7k
PostmanでAPIの動作確認が楽になった話
h455h1
0
130
pixivアプリでマルチモジュールを実現するまで
gatosyocora
1
130
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
5
650
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
356
22k
The Mythical Team-Month
searls
215
42k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
20
1.6k
Learning to Love Humans: Emotional Interface Design
aarron
266
39k
The Power of CSS Pseudo Elements
geoffreycrofte
59
5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Fantastic passwords and where to find them - at NoRuKo
philnash
36
2.5k
Agile that works and the tools we love
rasmusluckow
324
20k
Optimising Largest Contentful Paint
csswizardry
7
2.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
220
21k
How GitHub (no longer) Works
holman
304
140k
What's in a price? How to price your products and services
michaelherold
237
11k
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]