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

World: r3wp

[Postscript] Emitting Postscript from REBOL

Graham
2-Feb-2007
[1282]
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
[1300x3]
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.
Doing it programmatically without being able to interpret the eps 
is just trial and error.
Henrik
10-Apr-2007
[1303]
yeah, that's the problem
Graham
10-Apr-2007
[1304]
you would need a postscript interpreter to find out where the image 
is going to go.
Henrik
10-Apr-2007
[1305]
it seems Preview insists on using Letter as page size for postscript.r 
output. I have to assume that a real printer does the same. I need 
A4 and A5 both in portrait and landscape.
Graham
10-Apr-2007
[1306x2]
because eps is just a special postscript file that does not permanently 
alter the environment
Preview ?
Henrik
10-Apr-2007
[1308]
Preview.app
Graham
10-Apr-2007
[1309]
have you specified the bounding box correctly?
Henrik
10-Apr-2007
[1310x2]
it ignores it
only works for EPS
Graham
10-Apr-2007
[1312x2]
Odd ...
gsview works for me ...
Henrik
10-Apr-2007
[1314]
I think I need to specify this in the PS file, otherwise the printer 
just prints everything in Letter/portrait
Graham
10-Apr-2007
[1315x2]
yes ...
you need a bounding box in your ps file
Henrik
10-Apr-2007
[1317x2]
oh, hang on. there was a combination of things I didn't try here...
nope, happily ignored
Graham
10-Apr-2007
[1319]
try some other ps files generated by other apps
Henrik
10-Apr-2007
[1320x6]
still ignores it, but I think I figured out why it does that.
it behaves like a printer with letter paper in it. and just scales 
anything to fit in it.
if I ask for a print preview and specifically ask for A5 paper, it 
clips the drawing like a printer would
created a postscript knowlegde base checklist
caving in and trying to do this with imagemagick. :-(


however it does not load .ps files (no delegate), even though it 
says so with "identify -list format" in the console
oh, ghostscript is needed for this....
Geomol
10-Apr-2007
[1326]
A couple of useful PS links:

How to generate portable Postscript: http://alumni.media.mit.edu/~szummer/postscript/

What is the physical size of the page?: http://www.postscript.org/FAQs/language/node64.html

How to use Adobe PostScript language files properly.: http://www-cdf.fnal.gov/offline/PostScript/AdobePS.html

(Look under "Paper bin, tray, size, feed mode, etc. selection", where 
you also find a link to:)
PostScript Sins: http://www.byte.com/art/9508/sec13/art3.htm
Gripes: http://www.cs.wisc.edu/~ghost/doc/gripes.htm
Henrik
10-Apr-2007
[1327]
Geomol, I made a checklist for links
Geomol
10-Apr-2007
[1328]
oki
Henrik
10-Apr-2007
[1329x3]
feel free to put stuff in there :-)
Geomol, I've added EPS output, bounding box and page orientation 
to postscript.r. This is done with a 'preamble which is followed 
by a block.
and then the page [...] stuff comes.