printing raw postscript data on windows

Discussion in 'Python' started by Uwe Schmitt, Jul 14, 2006.

  1. Uwe Schmitt

    Uwe Schmitt Guest

    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
     
    Uwe Schmitt, Jul 14, 2006
    #1
    1. Advertising

  2. In article <1152896884$-saarland.de>,
    Uwe Schmitt <-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-"?
     
    Lawrence D'Oliveiro, Jul 15, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arthur

    Printing Postscript in Perl

    Arthur, Mar 7, 2004, in forum: Perl
    Replies:
    2
    Views:
    651
    Roel van der Steen
    Mar 7, 2004
  2. bilian
    Replies:
    1
    Views:
    519
    Niels Dybdahl
    Nov 4, 2004
  3. Glen Pepicelli
    Replies:
    1
    Views:
    1,245
    Betty
    May 15, 2005
  4. Replies:
    0
    Views:
    571
  5. Replies:
    0
    Views:
    169
Loading...

Share This Page