473,320 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 12146
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: uri bushey | last post by:
So I have a tkinter based little program in Python that has a canvas loaded with a WaveSurfer (http://www.speech.kth.se/wavesurfer/) widget. I am trying to print the contents of the WaveSurfer...
0
by: Jim & Joanne Collins | last post by:
Craig, Thank you very much for your response. I've interspersed my questions in your reply. If you have answers to my question I would be extremely gratefull for your assistance! Thanks.
8
by: David Isaac | last post by:
"Alan Isaac" <aisaac0@verizon.net> wrote in message news:_A34e.2207$1r6.248@trnddc02... > I'd like to try personal financial management using Python. > I just found PyCheckbook, but it does not...
19
by: dcrespo | last post by:
Hi all... Is there a way to print a PDF file directly from Python without having Acrobat installed? I know about ReportLab. It's a python module that lets you create almost any PDF document, but I...
4
by: Arthur | last post by:
Hi Everyone, I'm having a real hard time with this. Maybe some smarter people can assist. I'm running Mandrake 9.2. I have a Laserjet 4M Plus. I want to be able to print Postscript, bold,...
1
by: BJS | last post by:
Sorry for the cross-posting, but based on the number of people I have seen ask for a solution to this problem, I hope by cross-posting this, that it will help a lot of people out of a common...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
7
by: Maravilloso | last post by:
Hi I'm trying to automatically send a postscript file to be printed to the default printer in a Win98 PC, by means of using the instrucction: win32api.ShellExecute (0, "print", "file.ps",...
0
by: Linda Liu[MSFT] | last post by:
Hi Al, Based on my understanding, you have an application which prints something to printers. The problem is that the font of "OCR A Extended" cannot be printed properly on some of printers. If...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.