Write a script to combine multiple images into one PDF file, properly scaled and under a given file size. Probably not to be integrated into shrink, because input and output have different formats. Old version:
for i in {2..99999}; do
echo "trying 1/$i…"
convert conti_1.png conti_2.png -scale "$(qalc -t -s "maxdeci 0" "100/$i")%" -page "A4" conti.pdf
size=$(du -b conti.pdf | awk '{print $1}')
echo "($size bytes)"
if (( $size <= 15728640 )); then
break
fi
rm conti.pdf
done
Write a script to combine multiple images into one PDF file, properly scaled and under a given file size. Probably not to be integrated into
shrink
, because input and output have different formats. Old version: