Comment 13 for bug 309314

Revision history for this message
zephyr (thierry-bock) wrote :

The corrected cpdftocps also has an error.
when printing xxy pages it prints y (y being the last digit) and ignores the xx (so i can print between 0 and 9 pages, zero being accepted and passed to the printer which receives it and then prints it 0 times)

the perl expression line 74 :
copies=`grep -a '%%PDFTOPDFNumCopies' "$infile" | perl -p -e 's/^.*(\d+)\s*$/\1/'`
only returns the last digit of the number given
i corrected locally to ( replaced * match with \D )
copies=`grep -a '%%PDFTOPDFNumCopies' "$infile" | perl -p -e 's/^\D*(\d+)\s*$/\1/'`
there might be side effects, but at least it removes the problem i have.

attached the corrected version of the file.