ezgg-badge-generator/output_badges/merge.py
David Rodenkirchen c53b89100a fu
2026-05-05 18:41:44 +02:00

14 lines
432 B
Python

import os
from subprocess import check_output, DEVNULL
from from_root import from_root
for file in os.listdir(from_root("output_badges")):
if file.endswith(".pdf"):
outfile_name = file.split(".pdf")[0]
outfile_name += "-print.pdf"
check_output(
["pdfjam", file, "--nup", "1x2", "--paper", "a4paper", "--noautoscale", "true", "--outfile", outfile_name],
stderr=DEVNULL
)