[fpc-pascal] Pascal postscript reading library

Krishna v.krishnakumar at gmail.com
Wed Apr 23 13:35:46 CEST 2008


On Wed, Apr 23, 2008 at 3:59 PM, Felipe Monteiro de Carvalho
<felipemonteiro.carvalho at gmail.com> wrote:
> On Wed, Apr 23, 2008 at 4:32 AM, Krishna <v.krishnakumar at gmail.com> wrote:
>  >  Hmm... vague your mail is. What kinda interpretation? If all you want
>  >  is to slurp the text then it might be possible but then Postscript is
>  >  a full blown programming language and people (mostly) come up with
>  >  their own operators for showing text...
>
>  Ok, I think it's time to explain a little bit more in detail what I am
>  trying to do.
>
>  I am building a CNC Machine. It's like a 3D printer, it can cut into
>  wood and metal and build objects, or generate drawings (not with ink,
>  but through cutting) into existing objects.
>
>  The drawing will most likely come from CorelDraw. We are developing a
>  printer driver which will then use a ready made virtual printer which
>  is able to generate postscript as output, which will make our driver
>  very simple to build. I could read the CorelDraw files directly, but
>  I'd rather not be stuck to 1 drawing software, and CorelDraw may
>  change their files in the future, but postscript is likely to remain
>  stable.
>
>  So at this point I need to convert postscript into Machine commands,
>  i.e. move to start position, start drilling, move X, Y, move again,
>  etc ... end.
>
>  I don't need to parse everything from postscript,

Postscript needs no parsing as you can directly interpret it with data
and graphics stacks.

>  just the absolute
>  minimum to extract the vectorial drawing coordinates, start point and
>  end point.
>

I suggest you take a look at the library provided by ghostscript and
also the various gs widgets.

>  I am a little impressed that everyone says postscript is so complex,
>  so I'm reevaluating which path to go, but I do have a competent
>  software developer available to whom send the task, so the amount of
>  work isn't that much a problem =P (as long as it is doable by 1 person
>  in a couple of months)
>

just curious: does corel draw generate vectorial output? otherwise
your postscript output will contain a huge (ugly) bitmap...

cheers,
-Krishna
-- 
One reason that life is complex is that it has a real part and an imaginary part
 -Andrew Koenig



More information about the fpc-pascal mailing list