Adding CUPS filters for using PDF as standard print job format #2897

michaelrsweet opened this Issue Aug 6, 2008 · 21 comments


None yet
1 participant

michaelrsweet commented Aug 6, 2008

Version: -feature User: till.kamppeter

On the Printing Summit in Atlanta in spring 2006 we agreed on replacing PostScript by PDF as standard print job format.

Now, two years later, we have the needed CUPS filters. The OpenPrinting Japan workgroup has written the filters

  • imagetopdf
  • pdftopdf
  • pdftoraster

The filter

  • pstopdf

is a trivial script. It is Ghostscript-based and similar to pstoraster and pstopxl.

The filters

  • texttopdf
  • pdftoijs

were developed as a GSoC project and are ready now, too.

All filters are in the SVN on

They are libpoppler-based like the pdftops filter of CUPS 1.4.

I think they should get made a part of CUPS and maintained in the CUPS package as they serve for the same purpose as the filters which come already with CUPS and will make a complete PDF workflow with PDF-emitting aapplications and also with PDF printers.

This will also fix STR #1595


michaelrsweet commented Aug 10, 2008 User: till.kamppeter

I have attached the new filters now, packaged in a form that they can be added to the source tree of any not too old CUPS version (should work with at least 1.2, tested with 1.3.8) and by compiling and installing CUPS also the filters get compiled and installed. In addition to the requirements of CUPS itself libpoppler is needed.

Not that they are not patches, once because most of the changes are new files and second, to make the add-on work with any version of CUPS, including versions patched by distros.

See the README file on how to add and remove the filters.


michaelrsweet commented Aug 10, 2008 User: till.kamppeter

Note that my tarball only contains imagetopdf, pdftopdf, and pdftoraster. texttopdf and pdftoijs still need some final polishing.


michaelrsweet commented Aug 11, 2008 User: till.kamppeter

I have replaced the tarball by a new one, as the first let all executables and libraries of CUPS being linked against libpoppler, which especially lead to libpoppler-dev being required for compiling any program using the CUPS libraries.

Please use only the new tarball.


michaelrsweet commented Aug 14, 2008 User: till.kamppeter

I have tested the filters under Ubuntu Intrepid, with Gutenprint and also with HPLIP and the newest snapshot of foomatic-rip 4.0 and they work very well there. PDF input is actually taking the path through pdftopdf with them.


michaelrsweet commented Aug 15, 2008 User: till.kamppeter

Updated the attached tarball again. This third version also includes the texttopdf filter. Note that this filter needs the fonts to be configured. For most cases it is enough to rename /usr/share/cups/charsets/pdf.utf-8.simple to /usr/share/cups/charsets/pdf.utf-8 and to link the /usr/share/fonts/truetype/freefont/FreeMono*.ttf files to /usr/share/cups/fonts/ (fonts in package ttf-freefont). Linking in more fonts allows even CJK UTF-8-text printing with the PDF workflow.

Now all essential PDF filters are included. pdftoijs is less important, as current IJS drivers integrate perfectly into the PDF workflow with GhostScript and foomatic-rip 4.0.


michaelrsweet commented Aug 15, 2008 User: till.kamppeter

Small correction in the 4th tarball: Removed a hardcoded "-march=pentium" from filter/fontembed/Makefile. Now the code should compile on all platforms.


michaelrsweet commented Sep 5, 2008 User: till.kamppeter

The revision pdf-filters_v5.tar.gz fixes crashes of texttopdf on bad or missing fonts, and makes texttopdf also working without configuration of the fonts (at least for ASCII). Now also pdftoijs is included and so the set of filters is completed.


michaelrsweet commented Sep 5, 2008 User: mike

The IJS filter will never be bundled with CUPS.


michaelrsweet commented Oct 4, 2008 User: till.kamppeter

pdf-filters_v6.tar.gz contains fixes from Koji Otani on the pdftopdf and pdftoraster filters, once to correct the handling of the page geometry (page size, margins) and second, on the raster data generation for monochrome mode. Before monochrome raster output could produce totally black pages (


michaelrsweet commented Oct 8, 2008 User: till.kamppeter

To not attach a new tarball here whenever a small fix happens, all files concerning the PDF printing workflow are available here

including the tarball with the PDF filters from OpenPrinting Japan.

More info about the PDF workflow is here:


michaelrsweet commented Oct 8, 2008 User: till.kamppeter

Please do not use the attached tarballs any more. Please always use the files from the URL of my previous comment.


michaelrsweet commented Oct 20, 2008 User: till.kamppeter

I have uploaded a tarball without pdftoijs now:

This could be used to add the new PDF filters to CUPS.

One remark: The filter kit contains a Poppler-based pdftoraster filter. I have now created a Ghostscript-based pdftoraster filter (after fixing the "cups" output device so that it also works when PDF is fed into Ghostscript). This filter I have uploaded into the Ghostscript Subversion repository to the same place where also pstoraster resides. The advantage of a Ghostscript-based pdftoraster filter is that Ghostscript is more optimized for printing and it has more support for color management.

Therefore we will not necessarily need the pftoraster from this driver kit. But note also that the next Ghostscript release is only in February.

WDYT? Should we take out pdftoraster, too?


michaelrsweet commented Jan 24, 2011 User: olesalscheider

Is there any reason why this still isn't included in cups? The patches work great for me.


michaelrsweet commented Jan 25, 2011 User: mike

Aside from needing to do a full code review, the current filters do not support the full range of CUPS options and there are also legal/licensing issues we will need to deal with...


michaelrsweet commented Jan 25, 2011 User: till.kamppeter

Which CUPS options/features are missing in the filters? I will tell it to the developers of them and they will fix the filters to be feature-complete.

What are the legal issues? Copyright transfer? Please tell what you exactly need and I will tell it to the original developers. They probably have nothing against passing over the copyright in favor of having their filters in CUPS upstream.


michaelrsweet commented Jan 25, 2011 User: mike

Till: The last time I reviewed things the pdftoraster filter did not support all of the required color spaces and there were issues with number-up, page-ranges, etc. Until I get a chance to do a full review of the code I won't be able to provide a complete list of changes needed, and that is not going to happen before CUPS 1.5 is released.

As for the legal issues, since this is such a large contribution it will need to go through Apple legal review. I have been working with Apple legal on this and hope to have some answers about the process soon.


michaelrsweet commented Feb 7, 2011 User: till.kamppeter

I have uploaded updated tarballs now. There I have added a Poppler-based pdftoraster filter which can be used instead of the pdftoraster filter which comes with Ghostscript.

The filter is, as several of the other filters, written by Koji Otani from BBR, Japan. It should support all supported color spaces and it also supports ICC color profiles and all the recently added PPD extensions for Duplex printing.

It is much faster than the Ghostscript-based filter and also more reliable in rendering complex PDFs (with images and/or transparency).

With this we come closer to a printing environment without PostScript interpreter and so without Ghostscript. If all applications send PDF and if only CUPS Raster, IJS, or OpenPrinting Vector drivers or native PostScript/PDF printers are used Ghostscript is not necessary any more. Ghostscript is only needed for the few cases that an application sends PostScript but the printer is non-PostScript or if a Ghostscript built-in driver is needed (like pxlmono/pxlcolor).


michaelrsweet commented Feb 8, 2011 User: sho-otani

When you can review these filters, please tell me details to fix.

And also tell me what I can do with legal things when you get answers.

Koji Otani


michaelrsweet commented Jan 12, 2012 User: mike

These are now being tracked as part of the CUPS 1.6 "extras" on


michaelrsweet commented Jan 12, 2012 User: till.kamppeter

See also

I have set up the new upstream package named cups-filters as a part of the OpenPrinting project. Its development is tracked via BZR on

Bugs and feature requests are tracked on, product OpenPrinting, component cups-filters.

Browser access for the BZR repository is here:

bzr branch


michaelrsweet commented Jan 28, 2012 User: till.kamppeter

Now a first beta version of the new OpenPrinting CUPS Filters package is released. See

Download places for all releases and daily snapshots is


@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment