[cups.general] Problems printing PDF files through cups.

Kurt Pfeifle k1pfeifle at gmx.net
Thu Sep 27 13:37:01 PDT 2007


Gerald Britton wrote:
> Oh, perl scripts are in the cups filters direcroty. The binary on my
> system says:
> 
> $ /usr/bin/pdftops -v
> pdftops version 3.00
> Copyright 1996-2004 Glyph & Cog, LLC


That doesn't help. *This* binary is provided by the xpdf package (or
by the xpdf-utils packages). Since it doesn't follow the calling con-
ventions expected by CUPS for all its filters:

  cupsfiltername job user title copies options [filename]

there is the need for the Perl script which is only a wrapper to run
the /usr/bin/pdftops so that CUPS calling conventions are followed (and
possibly job options are applied as needed.)

*However*, when *I* mentioned the pdftops binary, I meant the one that
would "normally" be built and installed as /usr/lib/cups/filter/pdftops
(as a binary), if you compiled CUPS from the sources. But since you are
not using a CUPS-provided filter, but a third-party one that is used as
a drop-in replacement for the original CUPS one, this bug is not (neces-
sarily) a CUPS bug...

The CUPS pdftops filter is *also* derived from xpdf (but has a few fixes
and probably modifications).

Some distros didn't like it because in the past there had appeared se-
curity relevant bugs in XPDF and in all XPDF-derived code (which not only
did bite CUPS, but also kpdf/KDE, evince/GNOME, poppler....).

And whenever that was the case, they needed to fix the hole at two places
(in xpdf-utils *and* in CUPS) and role out at least 2 new patched packages.
That's why they thought it to be a good idea to kick out CUPS' pdftops and
replace it with the Perl wrapper. At least it would spare them part of the
work if there appeared any new security hole in XPDF.

The price is that now CUPS supporters (like the volunteers on this list)
do have at least double the work with all pdftops questions, CUPS appears
in a "buggy light", and users like you have an endless, tiring struggle to
get your standard print jobs done correctly if you print PDF...  :-|

So if you want to test the *original* CUPS pdftops binary, you'll have
to find someone who can mail it to you, or you must compile CUPS on your
own.

Or maybe you can send me a link to your PDF, and I can test it on my
system from the commandline (I've openSUSE-10,2 currently with the
original CUPS-provided pdftops, as well as a self-compiled CUPS-1.4svn
version).


> On 9/27/07, Gerald Britton <gerald.britton at gmail.com> wrote:
>> I've tried both the old pdftops (that came with my cups distro) and
>> the new one that Helge pointed me to.  Both are perl scripts as it
>> turns out.
>>
>> Helge has tried really hard and has earned my respect, that's for
>> sure!  Just wish this were easier!!
>>
>> On 9/27/07, Kurt Pfeifle <k1pfeifle at gmx.net> wrote:
>>> Gerald Britton wrote:
>>>
>>>> On 9/27/07, Helge Blischke <h.blischke at srz.de> wrote:
>>>>> Gerald Britton wrote:
>>>>>> I've run the same job with both the old and new pdftops and the old
>>>>>> and new pstops.  The results are the same no matter what.  The only
>>>>>> thing that has made a difference is using the postcript driver instead
>>>>>> of hpijs.
>>>>>>
>>>>>> I put "Nearest size and scale" in the printer options.  That means I
>>>>>> do not need the option on the command line.  It doesn't really work
>>>>>> though.  I still get a prompt for 12x18 stock.  If I also put -o
>>>>>> PageSize=letter, I get it printed landscape on letter without a prompt
>>>>>> but no scaling.
>>>>>>
>>>>>> The other weird thing is that if I use -o PageSize=legal, I have to
>>>>>> manually tell the printer to use the stock in the drawer (that it
>>>>>> knows!) has legal-size paper.
>>>>>>
>>>>>> Bottom line: Scaling to fit doesn't work with this release of cups,
>>>>>> even with the alternate filters.
>>>
>>> ${WORKSFORME}.... [*1]
>>>
>>> Anyway, I wasn't able to follow your conversation after my own comment,
>>> and it seems Helge has already put in a big effort to solve the problem.
>>>
>>> But please tell me one thing before I try to go down the wrong brain
>>> loop: is it the wrapper-script based pdftops filter you are using (because
>>> that's what your distro gave you instead of the original), or is it the
>>> binary one that ships with CUPS originally?
>>>
>>> --------
>>> [*1] with the original pdftops binary as compiled from CUPS sources
>>>      (which are derived from xpdf).
>>>


-- 
Kurt Pfeifle
System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH  .....................  Hedelfinger Strasse 58
A RICOH Company  ...........................  D-70327 Stuttgart/Germany




More information about the cups mailing list