Comment 21 for bug 838856

Revision history for this message
Michael Adams (unquietwiki) wrote :

I have a fix for the PDF printing issue! http://unquietwiki.blogspot.com/2012/05/fixing-pdf-printing-problems-on-ubuntu.html

Procedure

1. In a terminal, sudo bash or login as root.
2. Make the /usr/lib/cups/filters/pdfwash file with your favorite text editor (nano or leafpad works).
3. Using the text editor, change the lines in the /usr/share/cups/mime/cupsfilters.convs file to look like what I posted.
4. chmod a+x /usr/lib/cups/filters/pdfwash
5. /etc/init.d/cups/restart
6. Exit the terminal.

Files

/usr/lib/cups/filters/pdfwash

    #!/bin/bash
    # CUPS filter to wash PDF output for printing

    #jobid="$1"
    #user="$2"
    #title="$3"
    #copies="$4"
    #options="$5"
    #file="$6"

    temp_pdf=`mktemp /tmp/XXXXXX.pdf`
    pdftocairo -q -pdf -origpagesizes $6 $temp_pdf
    cat $temp_pdf
    rm $temp_pdf
    exit 0

/usr/share/cups/mime/cupsfilters.convs

    application/postscript application/pdf 0 pstopdf
    application/vnd.adobe-reader-postscript application/vnd.cups-postscript 0 pstops
    application/pdf application/vnd.cups-pdf 0 pdfwash
    application/vnd.cups-pdf-banner application/vnd.cups-pdf 33 bannertopdf
    #application/pdf application/vnd.cups-postscript 0 pdftops
    #application/vnd.cups-pdf application/vnd.cups-postscript 0 pdftops
    application/postscript application/vnd.cups-postscript 66 pstops