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
95
StoredFunctionのすゝめ
motooka
1
88
コメントは英語で書く!
motooka
1
91
TCPポート使い切り事件
motooka
1
460
SVG画像をPHPで生成しよう
motooka
0
1.3k
Working with Database Replications in CakePHP
motooka
1
2k
文字とPDFとPDFKit
motooka
2
2k
SVG破損事例の解説
motooka
1
740
エラー処理のUIデザイン
motooka
0
1.5k
Other Decks in Programming
See All in Programming
AIにコードを生成するコードを作らせて、再現性を担保しよう! / Let AI generate code to ensure reproducibility
yamachu
7
6k
Agent Rules as Domain Parser
yodakeisuke
1
340
AI Coding Agent Enablement in TypeScript
yukukotani
17
7.1k
TVer iOSチームの共通認識の作り方 - Findy Job LT iOSアプリ開発の裏側 開発組織が向き合う課題とこれから
techtver
PRO
0
710
テスト分析入門/Test Analysis Tutorial
goyoki
11
2.7k
DevDay2025-OracleDatabase-kernel-addressing-history
oracle4engineer
PRO
7
1.6k
Design Pressure
hynek
0
1.4k
JVM の仕組みを理解して PHP で実装してみよう
m3m0r7
PRO
1
250
OpenNext + Hono on Cloudflare でイマドキWeb開発スタックを実現する
rokuosan
0
110
型安全なDrag and Dropの設計を考える
yudppp
5
660
『Python → TypeScript』オンボーディング奮闘記
takumi_tatsuno
1
140
イベントソーシングとAIの親和性ー物語とLLMに理解できるデータ
tomohisa
1
160
Featured
See All Featured
Statistics for Hackers
jakevdp
799
220k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.6k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
The Invisible Side of Design
smashingmag
299
50k
Stop Working from a Prison Cell
hatefulcrawdad
269
20k
We Have a Design System, Now What?
morganepeng
52
7.6k
Code Reviewing Like a Champion
maltzj
523
40k
Visualization
eitanlees
146
16k
Writing Fast Ruby
sferik
628
61k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Adopting Sorbet at Scale
ufuk
76
9.4k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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