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

Helge Blischke h.blischke at srz.de
Fri Sep 28 06:37:41 PDT 2007


Gerald Britton wrote:
> Amazing!  I did not know you could simply ftp a file to the printer.
> I just did the same thing with the same files I sent to you and they
> printed correctly!
> 
> Now if I could just issue an lp command and achieve the same result....
> 
> I ran the command:
> 
> lp -d ps0198 /tmp/pstops.out
> 
> and it printed INcorrectly (scaled 100% (not fitted), wrong paper type
> (not nearest size)).  Also I had to manually tell the printer to use
> letter stock!
> 
> same thing with:
> 
> lp -d ps0198 /tmp/pdftops.out
> 
> Kurt suggested that my pdftops binary was broken by the debian team.
> I was quite prepared to believe that (not the first time) and was
> about to compile my own cups from the sources when your latest email
> arrived.
> 
> So, tell me if I'm correct about things so far:
> 
> 1. If I use pdftops piped to pstops then ftp the file to the printer, it works
> 2. The pdftops binary must be basically OK in my disto
> 3. Same thing for my pstops filter
> 4. Something strange happens when I let cups send the file to the
> printer from an lp command, whether from the original pdf or from the
> result of the pdftops or pstops commands
> 
> At this point, where do you think the problem lies?  In the pdftops
> filter? In the pstops filter? Somewhere else?
> 
> Anything else I can do to help get to the bottom of the problem?
> 
> On 9/28/07, Helge Blischke <h.blischke at srz.de> wrote:
> 
>>Kurt Pfeifle wrote:
>>
>>>Gerald Britton wrote:
>>>
>>>
>>>>Thanks for working on this, Kurt.  I've learned a lot in the process
>>>>and that never hurts.  I'm disappointed that I can't reach my ultimate
>>>>goal, but I can do it easily with acrobat reader on windows (a couple
>>>>of clicks and it's rotated and scaled perfectly).  I just trying NOT
>>>>to use windows for stuff like this.
>>>
>>>
>>>
>>>Hey, I now notice you didn't even pay attention and respond to my
>>>comments about specifying "landscape" as an option.
>>>
>>>Or did you?
>>>
>>>And did you receive the files I mailed to you?!?
>>>
>>>And did you run the commandline exactly as I showed you, with the
>>>PPD  as an env variable? (and you verified the PPD has the full de-
>>>finitions for "Legal"? and the PPD passes the "cupstestppd" test?
>>>It may after all be the case that even your distro's wrapper script
>>>works correctly if used in the right way...)
>>>
>>>
>>>
>>>>On 9/27/07, Kurt Pfeifle <k1pfeifle at gmx.net> wrote:
>>>>
>>>>
>>>>>Gerald Britton wrote:
>>>>>
>>>>>
>>>>>>here's the file I'm trying to print.
>>>>>
>>>>>I found it already in the meanwhile  :-)
>>>>>
>>>>>And I mailed you *my* results, which look perfect for "fitplot to
>>>>>Letter".
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>I want to print it landscape,
>>>>>
>>>>>No, you don't want to. Honest. :-)
>>>>>
>>>>>In 99.99% of cases, it will do the wrong thing when applied to PDF
>>>>>file printing. I don't believe your case is amongst the 0.01%  :-)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>scaled down to fit my page size.  If you can do it for A4 or A3, I
>>>>>>should be able to do it for legal
>>>>>
>>>>>OK, I'll repeat the test for legal, and let you know the result.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>http://data2.collectionscanada.ca/1851_pdf/e096/e002379200.pdf
>>>>>>
>>>>>>On 9/27/07, Gerald Britton <gerald.britton at gmail.com> wrote:
>>>>>>
>>>>>>
>>>>>>>After some more experimenting, I used the following command:
>>>>>>>
>>>>>>>lp -o landscape -o media=legal -o fitplot -o PageSize=legal myfile.pdf
>>>>>>>
>>>>>>>the "-o=landscape" actually makes it print portrait!  So I removed that and ran:
>>>>>>>
>>>>>>>lp -o media=legal -o fitplot -o PageSize=legal myfile.pdf
>>>>>>>
>>>>>>>This got me closer to my goal.  The printout was landscape orientation
>>>>>>>(I know, doesn't make sense!) but the scaling was for portrait
>>>>>>>orientation and thus too small!
>>>>>>>
>>>>>>>On 9/27/07, Gerald Britton <gerald.britton at gmail.com> wrote:
>>>>>>>
>>>>>>>
>>>>>>>>Thanks Kurt!  Yes, the $ was just from my prompt, when I cut and
>>>>>>>>pasted my results.  Helge helped me with the other operands as well.
>>>>>>>>I ran the commands and sent the output directly (not to the list,
>>>>>>>>since it is too big).
>>>>>>>>
>>>>>>>>I tried gv as you suggested.  It shrank the pdf to fit the page but
>>>>>>>>didn't obey the printer directive to fit to the nearest size and
>>>>>>>>scale.
>>>
>>>
>>>
>>Finally, it seems to an issue of the printer (i.e. the printer's PS interpreter)
>>itself. If I feed the PS files I got from Gerald (both the pdftops output as well
>>as the pstops output) to one of our HP printers, without further manipulation
>>(I used plain old ftp to submit the data), all printers I tested shrinked the
>>huge page to the largest available media, properly scaled and rotated.
>>
>>Gerald, perhaps you could once more feed the pdftops output through
>>the pstops filter with the PPD configured, as Kurt proposed (sorry, I forgot
>>to mention it), just to be sure.
>>
>>Helge
>>
>>PS: When I need to modify the "alternate pstops filter" next time, I'll
>>implement the fitplot option for PS printers that do *not* correctly
>>follow the PS specification regarding the page size policies.
>>
>>--
>>Helge Blischke
>>Softwareentwicklung
>>
>>H.Blischke at acm.org
>>_______________________________________________
>>cups mailing list
>>cups at easysw.com
>>http://lists.easysw.com/mailman/listinfo/cups
>>
> 
> 

Please repeat the offline pstops step after setting the PPD
environment variable to the abolute path to your printer's PPD
and post the result. I'd definitely like to look into that
before speculating any more.
And BTW, which backend do you use for your printer?
(post the device_uri).

Helge


-- 
Helge Blischke
Softwareentwicklung

H.Blischke at acm.org




More information about the cups mailing list