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
[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.
Henrik
24-Jun-2008
[1711x2]
I did not know that.
if it can that makes my task simpler.
Graham
24-Jun-2008
[1713]
the product description says that the HHP 1505 is a host based PCL 
printer
Henrik
24-Jun-2008
[1714]
yes it is. I think all HP printers are.
Graham
24-Jun-2008
[1715]
no
Henrik
24-Jun-2008
[1716]
well, as long as this one is.. :-)
Graham
24-Jun-2008
[1717x3]
try sending some raw PCL to the printer to see what happens
If it doesn't understand it .. then it's just a dumb printer
with a PCL driver
Henrik
24-Jun-2008
[1720x2]
hmm... need some examples for that.
and a new PC. that stupid machine just died. glorious day today.
Graham
24-Jun-2008
[1722x2]
setup a HP printer ( eg an old laserjet ) and set the driver to print 
to a file
take the printer output and send it directly to the printer if you 
can .. see what happens