Solved (Was: options in test page work, but not with lpr)
Andy Paul
yeno at gmx.net
Tue Jul 19 04:11:55 PDT 2011
From: Helge Blischke
Date: 09:04 Thu
>> Andy Paul wrote:
>>
>> here an _entire_ example file, that doesn't work (without the --- Sn?p
>> ---):
>> ---- snip ----
>> %!PS-Adobe-2.0
>> /Helvetica findfont 10 scalefont setfont
>> 10 40 moveto (Hello World) show
>> showpage
>> ---- snap ----
>>
>> these four lines, written in a file test.ps, prints without errors - but
>> only in the Standardbin:
>> lp -d mailb1 test.ps -> StandardBin
>> lp -d mailb5 test.ps -> StandardBin
>>
>> There is no further PS command or directive, that cups could take wrong.
>> It had simply to put the default values from the PPD of this queue to the
>> printer output. I'm still figure out the differences datastream send to
>> the printer.
>>
>> Greetings
>> Andy
>
> Well, then, can you set up a "printer" that prints to a file?
> (set FileDevice Yes
> LogLevel debug
> in cupsd.conf and restart cups,
> then set up a print queue with device-uri
> file:///somefileinadirectorythatis woldwritable
> and the very same PPD as that of your mailbx printers,
> and print a test file that does not work on the real printer(s)).
> Then post the generated file.
>
> Helge
Hello all
I've gotta sort it out.
CUPS seems to read along the DSC-commands and relies on their presence in the .ps-file for proper working. If these commands are absend, CUPS write its own settings behind the file, whereas might ignored by the postscript interpreter in the printer. (Think of postscript Defs behind the regular commands).
If you write a quick and dirty script to output postscript, be sure to add at least all the %%-commands mentioned in the example below:
---- snip ----
%!PS-Adobe-3.0
%%EndComments
%%BeginProlog
%%BeginFeature
%%EndFeature
%%BeginSetup
%%EndSetup
/F2
{/Helvetica findfont
dup length dict begin
{def} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Helvetica-ISOLatin1 exch definefont
} def
%%EndProlog
/Helvetica findfont 16 scalefont setfont
10 40 moveto (Hello World) show
F2 26 scalefont setfont
20 60 moveto (Hello World with umlauts like Überraschung) show
showpage
---- snap ----
CUPS will sort in its own settings in the right sections, but you have to declare them.
Thanks to Helge and Johannes for their hints and suggestions.
Regards
Andy
More information about the cups
mailing list