Re: Wouldl all Postcript devices/interpreters accept this code?



At Sat, 03 Jun 2006 13:23:31 -0500 Richard Owlett <rowlett@xxxxxxxxxxxxx> wrote:


*CAVEAT LECTOR*
1. I'm obviously new to Postscript
2. I'm puttering around the edges of a half-formed application idea
3. Well formed Postscript is low on list of priorities
-- but I do want it to work
4. The eventual application will be *INHERENTLY*
a. single page
b. specific output device

What follows could be the actual .ps file [NO preambles/postambles/etc]

/Times-Roman findfont 34 scalefont setfont
600 200 moveto (Rome) show
/Courier findfont 20 scalefont setfont
100 400 moveto (Rest of World) show

600 200 moveto 100 400 lineto stroke
600 200 moveto 150 50 lineto stroke

/Courier findfont 10 scalefont setfont
150 50 moveto (LaLa Land) show


Ghostscript is happy with above as *TOTAL* content of a .ps file.
Would other devices/interpreters be significantly less forgiving?

Ghostscript makes no attempt to check that the file is 'well formed'. It
assumes it is getting a stream of PostScript (unless it is fed something
that is a PDF file).


I can think of many^^MANY reasons not to do this.
But, would it fail under specified conditions? [ducking for cover ;]

At the very least you'll want something like

%!PS-Adobe-2.0

as the first line. If only to keep lpr and the like happy and sane. In
the simplest case, this is all you really need. I suspect that some
modern Postscript printers (eg HP's LaserJets) will need at least this,
since some of them are not 'pure' postscript printers -- they also
gronk plain text and HP's own printer control language and probably use
this first line to figure out how to deal with the job. Lacking the
PostScript signature, you might just get the file's source printed as
plain text or your clever lpr/CUPS setup will run the file though a2ps
for you or something else 'unexpected'.

So to answer your question: yes, it might fail under *some* conditions.



Thank you for any educational replies.



--
Robert Heller -- 978-544-6933
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
heller@xxxxxxxxxxxx -- Contract Programming: C/C++, Tcl/Tk

.



Relevant Pages

  • Re: A PostScript printer at home ?
    ... > Does anyone have a PostScript printer at home? ... > How much does it cost to operate per year? ... printers are lasers - there are some high end inkjets, ... There are very few true PostScript printers available any ...
    (sci.physics)
  • Re: Problems with using {PRINT} to send Postscript commands...
    ... Thanks for the tip on how to generate valid EPS files. ... another postscript bulletin board that it is possible to cache an EPS ... make printing to postscript printers more efficient. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Problems with using {PRINT} to send Postscript commands...
    ... Thanks for the tip on how to generate valid EPS files. ... another postscript bulletin board that it is possible to cache an EPS ... make printing to postscript printers more efficient. ...
    (microsoft.public.word.pagelayout)
  • Re: Problems with using {PRINT} to send Postscript commands...
    ... Thanks for the tip on how to generate valid EPS files. ... another postscript bulletin board that it is possible to cache an EPS ... make printing to postscript printers more efficient. ...
    (microsoft.public.word.general)
  • Re: [SLE] Overlays on forms when printing
    ... What I ended up doing was using Perl and PostScript - I converted the ... /Times-Roman findfont 20 scalefont setfont ... 160 1500 moveto ...
    (SuSE)