PDF size from CUPS-PDF

Issue #2 on hold
fusion created an issue

Hello. I have a word document with embedded PNG graphics. The length is 30,5 MB. When I print to PDF using CUPS-PDF, the length of the PDF is 721.8 MB whereas when I print to PDF using the MacOSX print dialog (MacOSX 10.6.3), I get a PDF whose3 size is 30.5 MB. Why is the PDF from CYPS-PDF more than 20 times as big as that from the MacOSX print dialog, and can this be fixed? I can send a (smaller) test file if you want.

Comments (3)

  1. Adam Knight repo owner

    The problem is how CUPS prints. If this solution were implemented as a CUPS filter with a direct-to-file backend then the output would be a similar size to Apple's as the software would be able to capture the original PDF data (all print jobs start as PDFs). However, this solution has been implemented as a backend that receives Postscript input that it then converts to PDF afterwards, which means the data has been converted from PDF to Postscript and then back to PDF.

    I'm intermittently looking at solutions that combine a filter, PPD, and a backend to maintain the original PDF data and get that smaller size, but that's something for later (or for someone else to submit to this project).

  2. Former user Account Deleted

    Hi there,

    I'm curious about this too. Is there anyway to harness the Mac OS PDF (or adobe 9.0) engine and turn it into a virtual printer with the same output ability as CUPS-PDF?

  3. Former user Account Deleted

    I have implemented a change to cups-pdf.c that seems to work. Two changes:

    • In preparespoolfile I added a detection if the file is PDF (and do a binary copy of the PDF to the spool dir)
    • In main I do a copy if the file is PDF instead of executing pstopdf

    In addition I added a line '*cupsFilter: "application/pdf 0 -"' to CUPS-PDF.ppd. This causes the pdftops filter to be skipped if the input is already PDF.

    This works very nice together with AirPrint from IPhone/iPad, which you can enable by adding a file airprint.types to /usr/share/cups/mime with content:

    image/urf urf (0,UNIRAST<00>)

  4. Log in to comment