Comment 33 for bug 405116

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have a fix ready now, but I have to wait for bug #732638 to get fixed so that I can upload it.

Or if you want to try already, run the following command lines:

perl -e 'my $content = join("", <>); while($content =~ s:^(\s*CustomMedia.*?<<)(/PageSize.*?>>.*?\n?.*?<<)(\/cupsInteger0\s+\d+)(.*>>.*)$:\1\3\2\3\4:smgi) {}; print $content' /usr/share/cups/drv/hpcups.drv > hpcups.drv.new
sudo mv -f hpcups.drv.new /usr/share/cups/drv/hpcups.drv

Then remove and recreate your print queue.

For the HPLIP upstream developers at HP: The Perl magic above adds the "/cupsInteger0 <PCL page size number>" also to the PostScript commands of the PageSize option of the hpcups driver (not only PageRegion). Please apply this change also to the upstream source code. Thanks.