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

Bug#701954: new discoveries



On 03/13/2013 11:53 PM, David Griffith wrote:
> 
> Regarding the problem of my prints to a Brother printer being offset, I
> found this page:
> http://selig.ws/hejdo/en/computers/linux/brother-printing.html
> 
> It describes my problems exactly.  The solution does not require
> fiddling with potentially proprietary source code, but instead a
> modifies CUPS. Trying to run this replacement cpdftocps with
> /usr/share/cups/mime/local.convs as suggested in the page doesn't work.
> In the "PostScript filters" section I see this:
> 
> application/vnd.cups-pdf        application/vnd.cups-postscript 22     
> pdftops
> 
> This appears to be the same as what executes cpdftocps in Squeeze. 
> There seems to be some sort of cost penalty involved here that doesn't
> let this line from local.convs from working:
> 
> application/vnd.cups-pdf application/vnd.cups-postscript 11 cpdftocps-mas
> 
> So I commented out the former line and added the latter line right
> underneath.  This fixes the print alignment problem
> 
> I don't know how this can be universalized or exactly why cpdftocps was
> removed.  Does this give you enough to go on to come up with a solution?
> 

Thank you for the hint.

In current Debian (unstable/experimental) and Ubuntu cpdftocps is
replaced by a new pdftops filter (part of the cups-filters package,
maintained upstream by me) which takes over both the role of the old
pdftops filter and of the cpdftocps filter. It is written in C and by
configuration settings or print job options one can make it use either
Ghostscript or Poppler. Currently, Ghostscript is the default and so the
problem described here should not occur.

In the future I intend continuing Ghostscript for desktop and server use
but switching to Poppler for mobile devices. In this case the problem
could reappear and I would need to add the equivalent of "grep -v
'Policies 1 dict dup begin .PageSize 3 def end def'" to the pdftops filter.

Now I have tested with the current Poppler on Ubuntu Raring and found
out that instead of

Policies 1 dict dup begin .PageSize 3 def end def

I get

/Policies 1 dict dup begin /PageSize 6 def end def

and I am in doubt of whether I have to remove this now to get compatible
with Brother printers. So I want to ask you to do some testing:

1. On Ubuntu Raring (you can boot it with a live CD) or Debian
Experimental try

a. Set up your printer and print normally. Does it work?

b. Make sure your print queue uses your Brother printer in PostScript
mode. Correct the queue's configuration if needed and re-test.

c. Print a job with the command line

lp -d <printer> -o pdftops-renderer=pdftops <file>

Does it still work correctly?

2. In your normal environment do the following:

pdftops <PDF file>

This produces a PS file containing the line

/Policies 1 dict dup begin .PageSize 3 def end def

Replace the line by

/Policies 1 dict dup begin /PageSize 6 def end def

with a text editor. Replace all occurences of the line.

Then print the file unfiltered:

lp -o raw <PS file>

Does it come out correctly?

   Till


Reply to: