Bug 156300 - CUPS support for poppler
Summary: CUPS support for poppler
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 10.2
Classification: openSUSE
Component: Printing (show other bugs)
Version: Alpha 1
Hardware: All SuSE Linux 10.1
: P5 - None : Enhancement (vote)
Target Milestone: ---
Assignee: Klaus Singvogel
QA Contact: Johannes Meixner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-08 22:50 UTC by Jörg Sonnenberger
Modified: 2008-06-25 09:38 UTC (History)
4 users (show)

See Also:
Found By: Third Party Developer/Partner
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Poppler fix to generate necessary PostScript headers (5.44 KB, text/x-diff)
2006-10-16 15:29 UTC, Klaus Singvogel
Details
Poppler fix to suppress hidden annotions (1.82 KB, text/x-diff)
2006-10-16 15:30 UTC, Klaus Singvogel
Details
Poppler fix to render a specific page (1.85 KB, text/x-diff)
2006-10-16 15:31 UTC, Klaus Singvogel
Details
CUPS patch to use poppler (1st try, not complete) (4.77 KB, text/x-diff)
2006-10-16 15:34 UTC, Klaus Singvogel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Sonnenberger 2006-03-08 22:50:23 UTC
CUPS currently uses xpdf2 derived code for pdftops, resulting in the regular exploit-of-the-month. I've looked at replacing the shipped code with poppler for pkgsrc and the result is ftp://packages.stura.uni-rostock.de/patches/cups-poppler.diff

It might need some munching of the include paths to find the poppler headers.

It would be nice to coordinate efforts (esp. a possible upstream merge), since this is IMO interesting for SuSE as well. The code lacks some testing. Basic operation including resizing seem to work, but the advanced features like Duplex etc. are untested.
Comment 1 Dirk Mueller 2006-03-09 09:01:00 UTC
I've mixed feelings about applying such patches: While it is in general a good idea, xpdf interface code is fragile and replacing the code can produce quite some subtle problems.

Comment 2 Klaus Singvogel 2006-03-09 10:14:34 UTC
I had a quick look at the poppler diff, and maybe I didn't catch every point, so please correct me, if I'm wrong.

First of all, I'm sorry to say, but we are at feature freeze for 10.1 since quiet some time. Introducing poppler means, a major feature with major effort for all the other packages too. ==> TOO LATE :(

Second, if you want to introduce poppler to the main CUPS code, go to http://www.cups.org/str.php and make a bug report of priority "enhancement". This is the best way to do. Then SUSE ain't doing it on its own way, while SUSE customers are bared out from the CUPS mailing lists then.

Third, having a closer look at the code, I can tell you, that we run into some cyclic problems in the build of packages. Poppler requires some non-basic packages, like FreeType2, qt4 or glib, to build. But qt/glib requires (indirectly) a cups package to get build, and cups requires poppler to get build. Gotcha. :( We run into a problem which package needs to be build first...

Finally CUPS currently uses xpdf-2.02 with some additional features. Those features need to be introduced into poppler library and have to work, if poppler library is called by some other programs like xpdf, kpdf, pdftex etc. The same is valid for the changes to xpdf by kpdf/pdftex/... But good news is, that the CUPS author Mike Sweet is in good contact with Derek, author of xpdf. So I think the changes for the CUPS part aren't to difficult to do.

The good news is: the duplexing of the CUPS system is currently not done by the PDF part, instead it's done in the pstops part. This is not a problem. But the adaptions of xpdf to work as a cups filter are the problem.

I like the idea of having poppler in the distribution. I thought already on some solution how to introduce the xpdf system as a replacement of pdftops, and poppler seems now to be the solution for me. But adding poppler requires a major change in our system, to gain the benefits. I would say, this can't be done for the next SUSE Linux version at the moment.
Comment 3 Klaus Singvogel 2006-03-09 10:19:55 UTC
AJ, I think it's a good idea to have poppler in one of our next SUSE Linux versions.
Can you please handle all the necessary management tasks to get poppler used by: xpdf, gpdf, kpdf, koffice, tetex, pdftohtml, cups
==> reassign.
Comment 4 Jörg Sonnenberger 2006-03-09 18:03:24 UTC
I'm fully aware of the feature freeze. bout the cyclic dependency, it should be possible to handle by splitting of libpoppler-qt and libpoppler-glib, reducing the dependency list to FreeType2.

I've submitted the entry for CUPS (ID 1471). I'm also working on extracting the local changes from CUPS. The initial review was that beside the PSFit attribute and some const additions no API change was introduced locally.
Comment 5 Andreas Jaeger 2006-03-12 16:20:17 UTC
Yes, let's investigate this closer for 10.2, I'll take care of it.
Comment 6 Ralf Flaxa 2006-05-03 12:19:34 UTC
Marking it as an enhancement request to better reflect that this is 10.2 work.
Comment 7 Andreas Jaeger 2006-07-03 07:30:12 UTC
Klaus, could you take care of this, please?
Comment 8 Klaus Singvogel 2006-10-16 15:27:21 UTC
Sascha Sommer, familiar with the printing system, made a patch for cups to support poppler (during my summer holidays).

We need to change poppler to get some additional functionality. Patches will be attached soon.

After those patches (JPR please apply with care) are in, I can change cups.
Comment 9 Klaus Singvogel 2006-10-16 15:29:04 UTC
Created attachment 101581 [details]
Poppler fix to generate necessary PostScript headers
Comment 10 Klaus Singvogel 2006-10-16 15:30:02 UTC
Created attachment 101582 [details]
Poppler fix to suppress hidden annotions
Comment 11 Klaus Singvogel 2006-10-16 15:31:35 UTC
Created attachment 101584 [details]
Poppler fix to render a specific page
Comment 12 Klaus Singvogel 2006-10-16 15:34:19 UTC
Created attachment 101585 [details]
CUPS patch to use poppler (1st try, not complete)

This patch is not complete, as it seems not to support to print a page range our of a PDF document. But it is a first shot, good to test with.
Comment 13 JP Rosevear 2006-10-16 19:50:56 UTC
Have any of these been submitted upstream for review yet?  I don't think my team has enough expertise to review these patches.
Comment 14 Sascha Sommer 2006-10-17 07:09:31 UTC
I submitted them to the cups maintainer (who made these changes for xpdf)
but I did not receive an answer yet.
See http://www.cups.org/str.php?L1471+P0+S-2+C0+I0+E0+Qpoppler
Comment 15 Klaus Singvogel 2008-06-25 09:38:50 UTC
is done in a different way.
modifying the document for poppler call with an additional program, then calling poppler-tools.

fixed in 11.0