469,603 Members | 2,057 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,603 developers. It's quick & easy.

printing raw postscript data on windows


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
1 10790
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.

Similar topics

1 post views Thread by uri bushey | last post: by
reply views Thread by Jim & Joanne Collins | last post: by
8 posts views Thread by David Isaac | last post: by
19 posts views Thread by dcrespo | last post: by
4 posts views Thread by Arthur | last post: by
7 posts views Thread by Maravilloso | last post: by
reply views Thread by Linda Liu[MSFT] | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.