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
63
TCPポート使い切り事件
motooka
1
220
SVG画像をPHPで生成しよう
motooka
0
1.1k
Working with Database Replications in CakePHP
motooka
1
1.9k
文字とPDFとPDFKit
motooka
2
1.8k
SVG破損事例の解説
motooka
1
670
エラー処理のUIデザイン
motooka
0
1.4k
モバイルアプリとGDPR
motooka
0
1.8k
JVNに情報掲載した話
motooka
1
1.5k
Other Decks in Programming
See All in Programming
Arm移行タイムアタック
qnighy
0
310
CSC509 Lecture 11
javiergs
PRO
0
180
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Jakarta EE meets AI
ivargrimstad
0
590
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
1.9k
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
Remix on Hono on Cloudflare Workers
yusukebe
1
280
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
イベント駆動で成長して委員会
happymana
1
320
subpath importsで始めるモック生活
10tera
0
300
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Building Applications with DynamoDB
mza
90
6.1k
Fireside Chat
paigeccino
34
3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Designing for Performance
lara
604
68k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
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