PDF Command Line

Aus Alexander's Wiki
Version vom 13. Juni 2022, 19:26 Uhr von Admin (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „== Community Version == === Coherent PDF === https://community.coherentpdf.com/<syntaxhighlight lang="bash"> cpdf -add-text "Non commercial use" -topleft 100…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Community Version

Coherent PDF

https://community.coherentpdf.com/

cpdf -add-text "Non commercial use" -topleft 100 -font "Helvetica" -font-size 30 in.pdf -o out.pdf

Freie Version

install enscript, ps2pdf and (pdftk or qpdf)

Mit pdftk

echo "I will be stamped on top of the page" | enscript -B -f Courier-Bold16 -o- | ps2pdf - | pdftk input.pdf stamp - output output.pdf

Mit qpdf

tmpfile=$(mktemp) && echo "I will be stamped on top of the page" | enscript -B -f Courier-Bold16 -o- | ps2pdf - "$tmpfile" && qpdf out_merge.pdf --overlay "$tmpfile" --repeat=1-z -- out_oneline.pdf

(nur die erste Seite)

tmpfile=$(mktemp) && echo "I will be stamped on top of the page" | enscript -B -f Courier-Bold16 -o- | ps2pdf - "$tmpfile" && qpdf out_merge.pdf --overlay "$tmpfile" -- out_oneline.pdf