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
0
92
StoredFunctionのすゝめ
motooka
1
84
コメントは英語で書く!
motooka
1
87
TCPポート使い切り事件
motooka
1
450
SVG画像をPHPで生成しよう
motooka
0
1.3k
Working with Database Replications in CakePHP
motooka
1
2k
文字とPDFとPDFKit
motooka
2
2k
SVG破損事例の解説
motooka
1
730
エラー処理のUIデザイン
motooka
0
1.5k
Other Decks in Programming
See All in Programming
設計の本質:コード、システム、そして組織へ / The Essence of Design: To Code, Systems, and Organizations
nrslib
10
3.5k
Amazon CloudWatchの地味だけど強力な機能紹介!
itotsum
0
210
Serving TUIs over SSH with Go
caarlos0
0
120
generative-ai-use-cases(GenU)の推しポイント ~2025年4月版~
hideg
1
360
大LLM時代にこの先生きのこるには-ITエンジニア編
fumiyakume
7
3.3k
Deoptimization: How YJIT Speeds Up Ruby by Slowing Down / RubyKaigi 2025
k0kubun
1
1.7k
iOSアプリで測る!名古屋駅までの 方向と距離
ryunakayama
0
140
AIコーディングエージェントを 「使いこなす」ための実践知と現在地 in ログラス / How to Use AI Coding Agent in Loglass
rkaga
4
1.1k
「”誤った使い方をすることが困難”な設計」で良いコードの基礎を固めよう / phpcon-odawara-2025
taniguhey
0
180
メモリウォールを超えて:キャッシュメモリ技術の進歩
kawayu
0
1.9k
The Implementations of Advanced LR Parser Algorithm
junk0612
1
920
Contribute to Comunities | React Tokyo Meetup #4 LT
sasagar
0
580
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
550
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.4k
We Have a Design System, Now What?
morganepeng
52
7.5k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.2k
Docker and Python
trallard
44
3.4k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
810
It's Worth the Effort
3n
184
28k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
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