Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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.5k
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.6k
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
400
Enumerator - Enumerable's Ugly Cousin
rossta
1
540
Recurring Events with Montrose
rossta
3
2k
Enumerable - How I Fell in Love with Ruby
rossta
20
4.7k
Create and Deploy an Ember App in 5 Minutes
rossta
7
3.7k
Other Decks in Programming
See All in Programming
ID管理機能開発の裏側 高速にSaaS連携を実現したチームのAI活用編
atzzcokek
0
240
GISエンジニアから見たLINKSデータ
nokonoko1203
0
110
開発に寄りそう自動テストの実現
goyoki
2
1k
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
430
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
Cap'n Webについて
yusukebe
0
140
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
420
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
350
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
120
ゲームの物理 剛体編
fadis
0
350
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.2k
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
0
290
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.6k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Six Lessons from altMBA
skipperchong
29
4.1k
KATA
mclloyd
PRO
33
15k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Statistics for Hackers
jakevdp
799
230k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
A Modern Web Designer's Workflow
chriscoyier
698
190k
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]