PDF Command Line: Unterschied zwischen den Versionen
Aus Alexander's Wiki
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) K |
||
Zeile 11: | Zeile 11: | ||
Mit <code>pdftk</code><syntaxhighlight lang="bash"> | Mit <code>pdftk</code><syntaxhighlight lang="bash"> | ||
echo "I will be stamped on top of the page" | enscript -B -f Courier-Bold16 -o- | ps2pdf - | pdftk input.pdf stamp - output output.pdf | echo "I will be stamped on top of the page" | enscript -B -f Courier-Bold16 -o- | ps2pdf - | pdftk input.pdf stamp - output output.pdf | ||
</syntaxhighlight>Mit <code>qpdf</code>(alle Seiten)<syntaxhighlight lang="bash"> | </syntaxhighlight>Mit <code>qpdf</code> (alle Seiten)<syntaxhighlight lang="bash"> | ||
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 | 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 | ||
</syntaxhighlight>(nur die erste Seite)<syntaxhighlight lang="bash"> | </syntaxhighlight>(nur die erste Seite)<syntaxhighlight lang="bash"> | ||
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 | 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 | ||
</syntaxhighlight> | </syntaxhighlight> |
Aktuelle Version vom 13. Juni 2022, 19:29 Uhr
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
(alle Seiten)
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