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

World: r3wp

[Postscript] Emitting Postscript from REBOL

xavier
31-Jan-2007
[1252x2]
yes
i probably have to do it with a tally manesman if it can help
Henrik
31-Jan-2007
[1254]
I suppose it doesn't contain any graphics? if that's the case, you 
can print directly to the printer through LPT
xavier
31-Jan-2007
[1255x3]
yes no graphics and by lpt i think
it typically the kind of paper you got when you went out of the dentist, 
only caracters
and a dot matrix printer is not supposed to be connected by something 
else then the lpt port
Henrik
31-Jan-2007
[1258]
if you have access, try this on the machine in a dos prompt:

echo test > lpt1:
xavier
31-Jan-2007
[1259]
yes it s ok
Henrik
31-Jan-2007
[1260]
ok, then you can do the same from within rebol. I don't know if you 
can write to LPT from within rebol though, but you can call dos commands 
the same way as you just did with CALL.
xavier
31-Jan-2007
[1261]
yes .... and the format is 80x25 so i can put what i want where i 
want
Henrik
31-Jan-2007
[1262]
yes, that should be possible
xavier
31-Jan-2007
[1263]
thanks for your help ... sorry if my question was too simple
Henrik
31-Jan-2007
[1264]
no problem. this can be hard to figure out sometimes. at least you 
got at choice between this or going full postscript which is considerably 
harder. :-)
xavier
31-Jan-2007
[1265]
lollllll the tally will not support postscript and i dont need to 
do something harder
Sunanda
31-Jan-2007
[1266]
You may wnat to investifate Epson escape codes, eg:
http://www.cyberroach.com/analog/an10/epson.htm

There is a chance the printer will respond to them, and it may give 
you extra flexibility -- eg sending tabs rather than loads of spaces; 
or bolding, underline etc.
xavier
31-Jan-2007
[1267]
thanks .... terribly usefull too
Henrik
31-Jan-2007
[1268]
btw. is there anything like ncurses for rebol?
Sunanda
31-Jan-2007
[1269x2]
investifate --> invesigate (though I like the sound of the typo.....The 
sort of thing that happens to extras in the early reels of horror 
movies)
A bit like curses:
http://www.rebolforces.com/articles/tui-dialect/
Henrik
31-Jan-2007
[1271]
neat. could sometimes be nice if you are using SSH terminals a lot.
xavier
31-Jan-2007
[1272x2]
perfect.  It looks like what i need too.
it must be possible to describe a document for a dot matrix printer 
with that
Graham
31-Jan-2007
[1274x3]
I take it the application is windows based.
So, generate the output as postscript, and then use gsprint to print 
the postscript file to the epson printer ( default windows printer 
).
gsprint will format it for windows.
BrianH
2-Feb-2007
[1277]
So Graham, why did you get rid of John's blocks in your fork of his 
dialect? Was it to make generation easier?
Graham
2-Feb-2007
[1278x2]
it looked ugly
I think John agreed too!
BrianH
2-Feb-2007
[1280]
Is the dialect faster to process without them?
Graham
2-Feb-2007
[1281x2]
never went that far ...
If you like I'll pull my script and post it somewhere for dissection 
and improvement.
BrianH
2-Feb-2007
[1283]
That would be cool. I'd like to see if there would be a way to make 
it more powerful, something along the lines of Functional PostScript.
Graham
2-Feb-2007
[1284x3]
Interesting.
If they can do it in Scheme .. why not rebol?
You'll note that rotations and translations may not work so well.
BrianH
2-Feb-2007
[1287]
I always thought Scheme was a little clumsy for that. REBOL should 
be better.
Geomol
2-Feb-2007
[1288]
The latest version got rid of many of the blocks:
http://home.tiscali.dk/john.niclasen/postscript/postscript.html

A test source: http://home.tiscali.dk/john.niclasen/postscript/test.txt
Gabriele
2-Feb-2007
[1289x3]
if there's anything you need to borrow:
http://www.colellachiara.com/soft/PDFM2/pdf-maker.html
http://www.colellachiara.com/soft/PDFM2/typesetter.html
BrianH
2-Feb-2007
[1292]
Sweet. I'll take a look next week.
Henrik
10-Apr-2007
[1293]
Anyone know anything about page size and orientation in postscript? 
I'm trying to implement that in postscript.r. I got EPS partially 
working, but I don't know how printers handle EPS.
Graham
10-Apr-2007
[1294x3]
eps is just postscript.
but ...
some programs hide binary data in eps for preview purposes
Henrik
10-Apr-2007
[1297]
right, but does the printer center the drawing or put it in a corner 
or scale it up or how?
Graham
10-Apr-2007
[1298]
the eps decides that.
Henrik
10-Apr-2007
[1299]
I'm just not sure that is a good way to handle page sizes
Graham
10-Apr-2007
[1300x2]
hopefully the eps will print at 0x0 and you translate the coordinates 
to where you want to print it.
most of the time I think most eps printing is done inside a dtp program 
and you can then shift the image around to where you want it.