By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,548 Members | 1,396 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,548 IT Pros & Developers. It's quick & easy.

printing raw postscript data on windows

P: n/a

Hi,

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. The
problem is, that no error messages or exceptions
occur.

Is there any other way to print raw data ? I am using
wx, but wx does not seem to provide this functionality.

Greetings, Uwe
Jul 14 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article <11******************@hades.rz.uni-saarland.de>,
Uwe Schmitt <sc*****@num.uni-sb.dewrote:
>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-"?
Jul 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.