Created
January 6, 2018 16:52
-
-
Save yuwash/57e9e73c016ceb6726e0b6cbb37bd091 to your computer and use it in GitHub Desktop.
Die Elektroreturn-Versandmarke papiersparend viermal auf einer Seite ausdrucken
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
ETIKETT_PDF="dp-electroreturn_versandetikett.pdf" | |
OUT_PDF="${ETIKETT_PDF%.pdf}-multiplied.ps" | |
if ! [[ -e "$ETIKETT_PDF" ]]; then | |
echo please download it from https://www.deutschepost.de/de/e/electroreturn.html | |
else | |
pdftops "$ETIKETT_PDF" \ | |
&& pstops "0R(0,.5h)+0R(.5w,.5h)+0L(1w,.5h)+0L(.5w,.5h)" "${ETIKETT_PDF%.pdf}.ps" "${OUT_PDF%.pdf}.ps" \ | |
&& ps2pdf "${OUT_PDF%.pdf}.ps" \ | |
&& echo generated "$OUT_PDF" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment