r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Postscript] Emitting Postscript from REBOL

Henrik
24-Jun-2008
[1647]
No, ghostscript generates a bitmap for printing on any printer, which 
is what I have to use now. I used the adobe driver for the HP 1200.
Graham
24-Jun-2008
[1648]
so, you're also using gsprint?
Henrik
24-Jun-2008
[1649x2]
I call gswin32c.exe and feed it parameters to use the win32pr driver, 
which sends a bitmap to the printer given as a parameter in the same 
call.
will have a look at gsprint...
Graham
24-Jun-2008
[1651x2]
the point of using gsview is as a debugging tool
but I guess gswin32 should complain if there is an error in the ps 
code
Henrik
24-Jun-2008
[1653x2]
I don't use GSView at all.
I don't think it's the postscript itself that's buggy, but the transmission 
of the code to the printer. Perhaps they are screwing around with 
port settings inside the driver which we don't know about. So it 
may be a lower level problem.
Graham
24-Jun-2008
[1655]
Is it a shared printer?
Henrik
24-Jun-2008
[1656]
nope
Graham
24-Jun-2008
[1657]
so, you just writing to port 9100 ?
Henrik
24-Jun-2008
[1658]
doesn't that only work for ethernet printers?
Graham
24-Jun-2008
[1659x2]
I got some notes somewhere that async printing to a postscript printer 
caused me problems.
what sort of printer is it??
Henrik
24-Jun-2008
[1661]
It uses parallel/usb
Graham
24-Jun-2008
[1662]
and which were you using?
Henrik
24-Jun-2008
[1663]
HP Laserjet 1200
Graham
24-Jun-2008
[1664]
parallel or usb?
Henrik
24-Jun-2008
[1665x2]
it can use both.
and I tried both with similar results
Graham
24-Jun-2008
[1667]
what was your code to send the ps to the printer??
Henrik
24-Jun-2008
[1668]
I just echo'ed it through DOS to LPT1:.
Graham
24-Jun-2008
[1669x2]
this is what I do ...

write %//prn content
when printing to lpt1
Henrik
24-Jun-2008
[1671]
interesting... what decides that %//prn is LPT1?
Graham
24-Jun-2008
[1672x2]
dunno
But never had a problem
Henrik
24-Jun-2008
[1674]
interesting... but ok, now my focus is to make it work on any printer. 
as mentioned it is fed through ghostscript. when I read about GSPrint 
it almost seems like it does the same thing. it even uses the same 
driver.
Graham
24-Jun-2008
[1675x2]
%//lpt1 is also possible, but according to google, %//prn diverts 
to the first availabel printer
from Andrew Martin

Printer: func [Text [string!] /Page] [
    secure [
        %//prn [allow write]
    ]
    write %//prn Text
    ; Append Carriage Return (CR) and Page Feed.
    if Page [write/binary %//prn "^(0D)^(page)"]
    Text
]
Henrik
24-Jun-2008
[1677]
so %prn is a DOS/win32 thing that REBOL just uses?
Graham
24-Jun-2008
[1678]
it might not work under Windows 98
Henrik
24-Jun-2008
[1679]
I've been informed that we are not using win98 anymore (yay!)
Graham
24-Jun-2008
[1680x4]
this is what I had to do for usb printers .. http://synapsedirect.com/forums/thread/396.aspx
and so %//prn will still work ...
Maybe this is even going thru the windows printer driver
so might fix your problems as well.
Henrik
24-Jun-2008
[1684]
it's a confusing subject, because there are 20 different ways to 
print :-)
Graham
24-Jun-2008
[1685]
well, if the way you're doing it now is not working ... I suggest 
you try my ways :)
Henrik
24-Jun-2008
[1686]
the problem is that the new printer is not a postscript printer.
Graham
24-Jun-2008
[1687x2]
Huh??
the HP 1200 ?
Henrik
24-Jun-2008
[1689x2]
sorry if I confused you. no the HP1200 one is no longer being used
I ranted about it, because I could not print directly to it, but 
had to use the adobe driver for that.
Graham
24-Jun-2008
[1691]
well, then there is very little option except to use ghostscript
Henrik
24-Jun-2008
[1692x2]
now with a new printer, I have to create a completely different setup 
with ghostscript.
the only problem is the speed. I really wish I could speed it up.
Graham
24-Jun-2008
[1694x2]
faster PC
what printer do you have now?
Henrik
24-Jun-2008
[1696]
HP Laserjet 1505.