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
950
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
450
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
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Better Code Design in PHP
afilina
PRO
0
120
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
初めてDefinitelyTypedにPRを出した話
syumai
0
400
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
Quine, Polyglot, 良いコード
qnighy
4
640
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
880
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Rails Girls Zürich Keynote
gr2m
94
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
GraphQLとの向き合い方2022年版
quramy
43
13k
Producing Creativity
orderedlist
PRO
341
39k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
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]