Re: Wouldl all Postcript devices/interpreters accept this code?
- From: Robert Heller <heller@xxxxxxxxxxxx>
- Date: Sat, 03 Jun 2006 21:08:41 +0200
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
.
- Follow-Ups:
- Re: Wouldl all Postcript devices/interpreters accept this code?
- From: Rod Dorman
- Re: Wouldl all Postcript devices/interpreters accept this code?
- References:
- Wouldl all Postcript devices/interpreters accept this code?
- From: Richard Owlett
- Wouldl all Postcript devices/interpreters accept this code?
- Prev by Date: Wouldl all Postcript devices/interpreters accept this code?
- Next by Date: Re: Wouldl all Postcript devices/interpreters accept this code?
- Previous by thread: Wouldl all Postcript devices/interpreters accept this code?
- Next by thread: Re: Wouldl all Postcript devices/interpreters accept this code?
- Index(es):
Relevant Pages
|