🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #139

Re: How do I recognize postscript from a file

#139
From: Arto V. Viitanen
Date: Wed, 04 Nov 1992 07:54
23 lines
1736 bytes
>>>>> On 3 Nov 92 11:14:48 GMT, eweingar@loanshark.cs.indiana.edu (Peter Weingartner) said:

Peter> In article <1992Nov3.083527.20756@ugle.unit.no> helgeaa@colargol (Helge O. Aarstein) writes:

Peter>    We are trying to make a filter for the lp-command to reject 
Peter>    non-postscript files. But, there is a problem: 
Peter> 	   How can I be sure that the file contains postscript-
Peter> 	   code?

Peter> The simplest way is probably to check to see that the first two
Peter> characters of the file are '%!'.  

When printing from MS Windows to Postscript file, the file (if you don't
make it not to) starts with characters ^D%! (i.e. control-D, %, !). In a way,
this is right way, since ^D means end-of-job to a Postscript printer, so
previous job is stopped. I only thought to say this, since lpr-filter on our
department checks the %! -pair, and several times Postscript document has
been run through Ascii-to-PS filter.

--
Arto V. Viitanen				               email: av@uta.fi
University Of Tampere,				   	           av@cs.uta.fi
Finland
Technical Details
Message-ID: <AV.92Nov4095431@kielo.uta.fi>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!agate!doc.ic.ac.uk!uknet!mcsun!news.funet.fi!uta!kielo!av
References: <1992Nov3.083527.20756@ugle.unit.no> <EWEINGAR.92Nov3111448@loanshark.cs.indiana.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!agate!doc.ic.ac.uk!uknet!mcsun!news.funet.fi!uta!kielo!av
From: av@kielo.uta.fi (Arto V. Viitanen)
Newsgroups: comp.lang.postscript
Subject: Re: How do I recognize postscript from a file
Message-ID: <AV.92Nov4095431@kielo.uta.fi>
Date: 4 Nov 92 07:54:30 GMT
References: <1992Nov3.083527.20756@ugle.unit.no>
 <EWEINGAR.92Nov3111448@loanshark.cs.indiana.edu>
Sender: news@uta.fi
Reply-To: av@uta.fi (Arto V. Viitanen)
Organization: University of Tampere, Finland
Lines: 23
Nntp-Posting-Host: kielo
In-reply-to: eweingar@loanshark.cs.indiana.edu's message of 3 Nov 92 11:14:48 GMT