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
続・パイプを通るPDF
Search
T. MOTOOKA
April 07, 2018
Programming
0
1.1k
続・パイプを通るPDF
ワンライナーでPDFに絵を描きましょう
T. MOTOOKA
April 07, 2018
Tweet
Share
More Decks by T. MOTOOKA
See All by T. MOTOOKA
コメントは英語で書く!
motooka
1
66
TCPポート使い切り事件
motooka
1
230
SVG画像をPHPで生成しよう
motooka
0
1.1k
Working with Database Replications in CakePHP
motooka
1
1.9k
文字とPDFとPDFKit
motooka
2
1.9k
SVG破損事例の解説
motooka
1
680
エラー処理のUIデザイン
motooka
0
1.4k
モバイルアプリとGDPR
motooka
0
1.8k
JVNに情報掲載した話
motooka
1
1.5k
Other Decks in Programming
See All in Programming
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
250
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
770
.NET 9アプリをCGIとして レンタルサーバーで動かす
mayuki
1
770
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
180
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
920
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
650
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
180
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
670
Zoneless Testing
rainerhahnekamp
0
120
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
How to Think Like a Performance Engineer
csswizardry
22
1.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Six Lessons from altMBA
skipperchong
27
3.5k
Designing Experiences People Love
moore
138
23k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Raft: Consensus for Rubyists
vanstee
137
6.7k
The Cost Of JavaScript in 2023
addyosmani
45
7k
How STYLIGHT went responsive
nonsquared
95
5.2k
Transcript
ଓɾύΠϓΛ௨Δ1%' ୈճγΣϧܳษڧձ -5 CZ5.0500,"
୭ʁ w !U@NPUPPLB w େࡕαςϥΠτͷํ͔Βདྷ·ͨ͠ w झຯɿ47(ඳ͍ͨΓ1%'ॻ͍ͨΓ w ৬ۀ w
1)1ॻ͍ͨΓ42-ॻ͍ͨΓ w ٛͷ 1%'ॻ͍ͨΓ w )FBMUI$IFDLͷ௨Βͳ͍αʔόͷཧऀ w ݩϢʔϑΥχΞϜऀ
None
લճ·Ͱͷ͋Β͢͡ w ୈճγΣϧܳษڧձେࡕαςϥΠτ-5 w *NBHF.BHJDLDPOWFSUͰɺۭͬΆͷ1%'Λ࡞ΕΔ w ͦΕ45%065ʹు͚Δʂʂ w IFBEʹͤϔομ͕ݟ͑Δʢ͓͓͓͓͓ʂʂʂʂʂʣ w
Ԡ༻ͷ༨ɺ͍Ζ͍Ζ͋ΔΑͶʙʙɹ
1%'ΑɺύΠϓΛ௨Εʂ
ۭͬΆͷ1%'Λు͘ convert xc:none -page A4 pdf:-
(IPTU4DSJQUͰ/001 convert xc:none -page A4 pdf:- \ | gs -q
-sOutputFile=- -sDEVICE=pdfwrite -
ઢΛҾ͘ convert xc:none -page A4 pdf:-\ | gs -q -sOutputFile=-
-sDEVICE=pdfwrite \ -c '<< /EndPage { exch pop 2 lt { newpath 200 300 moveto 10 200 rlineto closepath 0.8 0.2 0.1 setrgbcolor stroke true }{false} ifelse } bind >> setpagedevice'\ -
ѹॖ͞ΕͨඳըࢦࣔΛ৳ convert xc:none -page A4 pdf:-\ | gs -q -sOutputFile=-
-sDEVICE=pdfwrite \ -c '<< /EndPage { exch pop 2 lt { newpath 200 300 moveto 10 200 rlineto closepath 100 0 0 setrgbcolor stroke true }{false} ifelse } bind >> setpagedevice'\ -\ | pdftk - output - uncompress
·ͱΊɿͬͨςΫ w *NBHF.BHJDLDPOWFSUɺۭͬΆͷ1%'Λు͚Δ w (IPTU4DSJQU1PTU4DSJQUͰ1%'ʹֆΛඳ͚Δ w QEGUL1%'ͷѹॖσʔλΛ৳Ͱ͖Δ w ͦͷ݁ՌɺMFTTͱ͔ͰඳըίϚϯυͷத͕ݟ͑Δ w
্هͷίϚϯυ܈TUEJOTUEPVUܦ༝Ͱ1%'ΛΓͱΓ Ͱ͖Δ
ࢀߟ̍ɿڥใ w 6CVOUV w *NBHF.BHJDL w (IPTU4DSJQU
ࢀߟ̎ɿڥߏஙྫ DockerΛͬͨྫ • docker run -it -v "$(pwd)/pdf":/pdf \ ubuntu:16.04
bash • exitޙͷ࠶ར༻ docker start -ai $(docker ps -a Ͱݟ͑Δname) • apt update • apt install ghostscript imagemagick pdftk less
ࢀߟ̏ɿ1PTU4DSJQU w 1%'ʹ(IPTU4DSJQUͰֆΛඳ͘ IUUQTTUBDLPWFSqPXDPNB
%%EOF