printing raw postscript data on windows

U

Uwe Schmitt

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
 
L

Lawrence D'Oliveiro

Uwe Schmitt said:
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-"?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top