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

World: r3wp

[Postscript] Emitting Postscript from REBOL

JaimeVargas
7-Apr-2006
[233]
AGG DRAW is pure vector gfx
Geomol
7-Apr-2006
[234]
Ok, text and vector graphics ... and some grey-tone/colour for a 
start. And then the rotate, scale and translate, that's already included 
in my postscript dialect.
Henrik
7-Apr-2006
[235]
what about page handling, page sizes, page breaks, etc?
Graham
7-Apr-2006
[236]
the view preview does not have to be perfect .. it just has to be 
good enough.
Henrik
7-Apr-2006
[237]
positioning and size is the most important in the preview. rendering 
and prettiness is less important
Graham
7-Apr-2006
[238x3]
for line elements, and text, that should not be a problem ( given 
the same fonts ).
All the more exotic drawing commands may be though.
Like you, I'm primarily interested in text, and lines ( my application 
uses LaTeX at present to do text ).
Henrik
7-Apr-2006
[241x2]
I need to output tables and text at specific locations as well as 
bar codes
straight lines, boxes
Graham
7-Apr-2006
[243]
that should be very easy to do with a postscript dialect.
Henrik
7-Apr-2006
[244]
managing line thickness is going to be important, but that may not 
be so hard
Graham
7-Apr-2006
[245x2]
thickness?
of lines, or text, or what?
Henrik
7-Apr-2006
[247x2]
of lines
I've seen a problem with a barcode reader that could not read codes 
printed from one expensive printer and it would read them fine if 
printed from another cheap printer
Graham
7-Apr-2006
[249]
line thickness can be specified in both ps and view.
Henrik
7-Apr-2006
[250]
turned out the expensive printer was able to separate two parallel 
lines just by a hair's width, where they should appear as a single 
line at double width of one line. that made the barcodes unreadable.
Graham
7-Apr-2006
[251x2]
that was bad programming.
it relied a printer deficiency to work.
Henrik
7-Apr-2006
[253x2]
I didn't discover the error until I tried it on the expensive printer. 
besides the size and position of the line was supposed to be correct. 
the barcode was created with PDF Maker
and it looks correct when viewed in a PDF Viewer
Graham
7-Apr-2006
[255]
even when you drill down on the bars to high resolution?  Remember 
screen res is only 72 dpi .. lower than your cheap printer.
Geomol
7-Apr-2006
[256]
PS has setlinewidth, and setting it to 0 will make is as thin, as 
the device can do.
Graham
7-Apr-2006
[257x4]
John, before we go further in developing this, I would like to know 
what license is going to be applied.  I note that yu have copyright 
nicomsoft in the header.
I think it would be good if someone could produce some draw scripts 
of varying difficulty, and then we can see how far we can get in 
rendering these to ps.
easiest might be some text and lines .. then boxes, circles, fills 
.. then gradient fills etc.
like a test suite for any dialect that is written.
Geomol
7-Apr-2006
[261x4]
Funny, I was just thinking about that. I think, I'll just make the 
first dialect being a small subset of PS, and then license can be 
the one, Carl talked about in a blog. Was it BSD?
Free for all use.
We could then put it in the Library, and others can develop it further. 
(Maybe that should be coordinated somehow?)
Is that ok?
Henrik
7-Apr-2006
[265x3]
graham, even if I take a good PDF viewer and zoom all the way in
so it's probably a problem with the printer, but still one that should 
be solvable by setting the width of the line jsut a few hair's width 
thicker
geomol, BSD license is yummy. please proceed. :-)
Graham
7-Apr-2006
[268x2]
BSD is good.
I've only done bar code printing using bar code fonts .. not directly 
in pdf-maker.
Henrik
7-Apr-2006
[270x3]
http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=ean13.r
<--- did this one a year ago. it uses PDF maker to generate barcodes
it can also generate bitmapped barcodes. works only with EAN13 format 
though
hmm... seems I forgot to upload the version that actually can use 
PDF Maker :-)
Geomol
7-Apr-2006
[273x2]
New version! Try:
do http://home.tiscali.dk/john.niclasen/postscript/postscript.r
print postscript [page [path [linewidth 10 at 72x72 box 72 72]]]
I only test it on the screen under MacOS, where there is an automatic 
converter. Can someone test it on a PS printer?
Henrik
7-Apr-2006
[275x2]
how do you convert it? I can't make preview.app read it
ah, problem fixed
Geomol
7-Apr-2006
[277x3]
I do:

write %test.ps postscript [page [path [linewidth 10 at 72x72 box 
72 72]]]
and then open test.ps with Finder.
ok :)
Maybe box shouldn't be inside a path block, but be an instance of 
itself?
Henrik
7-Apr-2006
[280]
I have no idea...
Geomol
7-Apr-2006
[281]
What is best?
page [path [at 72 72 box 100 100]]
or 
page [box 72 72 100 100]
Henrik
7-Apr-2006
[282]
the first one is most readable