printing raw postscript data on windows

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sat Jul 15 02:54:38 EDT 2006


In article <1152896884$mail2nntp at hades.rz.uni-saarland.de>,
 Uwe Schmitt <schmitt at num.uni-sb.de> wrote:

>I am trying to print raw postscript data on windows.
>win32print should do the work like this:
>
>   h=win32print.OpenPrinter(name)
>   win32print.StartDocPrinter(h, 1, ("", "", "RAW"))
>   win32print.WritePrinter(h, file("p.ps").read())
>   win32print.EndDocPrinter(h)
>   win32print.ClosePrinter(h)
>
>This works for some printers, but not for all.

One possibility is that the printer itself is doing some kind of 
auto-emulation-sensing. My experience is that this kind of thing never 
works reliably when PostScript is involved.

1) Can you check the printer settings, to ensure its "personality" (or 
whatever it's called) is set to "PostScript" and not "auto"?
2) Failing that, what if you make sure the first line of your PostScript 
is always a comment beginning with "%!" or "%!PS-"?



More information about the Python-list mailing list