tinyapps.org / blog


OS X: Batch convert and concatenate HTML files to a single PDF file #

with this Bash one-liner:

for i in *.html; do /System/Library/Printers/Libraries/convert -m application/pdf -f "$i" -o $(basename -s ".html" "$i").pdf; done && "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" -o combined.pdf ./*.pdf

(via cybercape and Fritz)

/mac | Sep 07, 2013


Subscribe or visit the archives