[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#613987: lpr prints blank pages



On Thu, 30 Oct 2014 21:11:02 +0000 Brian Potkin wrote:

[...]
> On Tue 28 Oct 2014 at 22:31:29 +0100, Francesco Poli wrote:
> 
> > On Tue, 28 Oct 2014 17:24:08 +0000 Brian Potkin wrote:
> > 
> > > These applications use cairo; a PDF submitted to cups is not the same
> > > PDF submitted by lpr and lp.
> > 
> > It seems to me that cairo uses more robust ways to submit print jobs to
> > cups: would it be possible to modify lpr so that it may use cairo to do
> > the "rendering" before submitting the print job to cups? 
> 
> The conversion of a PDF to a PDF may be seen as unnecessary and unlikely
> to meet with universal approval. For example:
> 
>   https://www.bountysource.com/issues/1333719-printing-if-input-file-is-ps-file-gets-directly-passed-to-cups-if-it-is-pdf-an-ugly-rerendering-happens

Wow, this is really awkward: slow libcairo processing? ugly result?
my own experience is quite the opposite...   :-/

> 
> You may do this for yourself if you want by having 'pdftocairo -pdf' in
> your workflow.

I tried to use

  $ pdftocairo -pdf foo.pdf - | lpr

and it seems to work, although it's clearly unpractical to type every
time...

[...]
> > > We could do with knowing what printers are used, their PPDs and how they
> > > are connected.
> > 
> > Two examples.
> > 
> > HP LaserJet 1320n
> > -----------------
> > connected via Ethernet LAN and configured with the following commands:
> > 
> > # lpadmin -p lj -E -v lpd://x.y.z.w/lp0 \
> >   -m foomatic:HP-LaserJet_1320-pxlmono.ppd \
> >   -o pdftops-renderer=pdftops \
> >   -D "HP LaserJet 1320"
> > # lpoptions -p lj -o media=A4 -o sides=two-sided-long-edge
> 
> That PPD outputs HP Printer Job Language and not PostScript. I don't
> think -o will have any effect. It could be used with the Phasor though.

I found a way to solve or work around the bug: I now use a PostScript
PPD and pdftocairo as PDF→PS renderer.
For instance:

  # lpadmin -p lj -E -v lpd://x.y.z.w/lp0 \
    -m postscript-hp:0/ppd/hplip/HP/hp-laserjet_1320-ps.ppd \
    -o pdftops-renderer-default=pdftocairo \
    -D "HP LaserJet 1320"
  # lpoptions -p lj -o media=A4 -o sides=two-sided-long-edge

After this print queue reconfiguration, lpr prints the troublesome
files correctly and it even seems to do so in shorter processing
times!    :-)
I tested the same solution or workaround on other printers, with
similar results.

I hope this strategy may work for the other users as well.

Bye!


-- 
 http://www.inventati.org/frx/
 fsck is a four letter word...
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

Attachment: pgpCzwRM_9A6y.pgp
Description: PGP signature


Reply to: