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
[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
[1696x2]
HP Laserjet 1505.
well, the bitmap it sends is over 2 MB in size. that's pretty huge 
for a pure b/w bitmap I think.
Graham
24-Jun-2008
[1698]
who's decision was it to purchase that?
Henrik
24-Jun-2008
[1699]
mine and budget. we can't afford a better printer.
Graham
24-Jun-2008
[1700]
you need to create a PCL driver :)
Henrik
24-Jun-2008
[1701x2]
it seems gsprint provides many more options... I will have to investigate 
that.
yeah :-(
Graham
24-Jun-2008
[1703]
cheap host based printer
Henrik
24-Jun-2008
[1704]
now if they stopped that winprinter crap and had postscript as standard 
in all printers... the hardware to do that should be fairly cheap 
for that today.
Graham
24-Jun-2008
[1705]
so it will always be slower than a PS printe.
Henrik
24-Jun-2008
[1706]
yes, I don't expect it to be as fast as PS, but this is like... 25-50 
times slower. :-)
Graham
24-Jun-2008
[1707x4]
do you need to print as soon as possible?
You do know that ghostscript can convert ps to pcl ??
and then you can dump the resulting prn file to the printer vs creating 
a bitmap??
Since the printer driver is host based, it would be doing the same 
thing as well.