Optimized Zero Padding
Brought to you by:
edoviak
The lines of code that added zero padding according to the current page number
while [ "$x" -le "$nu_pages" ]; do
if [ "$x" -lt 10 ]; then
(crop code)
elif [ "$x" -lt 100 ]; then
(crop code)
elif [ "$x" -lt 1000 ]; then
(crop code)
elif [ "$x" -lt 10000 ]; then
(crop code)
fi
done
are replaced by a more elegant code
for x in `seq -f '%04g' 1 $nu_pages`; do
(crop code)
done
which paves the way to remove the 10000 pages limitation.
Patch
Script with applied patch
Logged In: YES
user_id=1538618
Originator: YES
File Added: pdfcrop