script headers 
Author Message
 script headers

Hi, I am new to postscript. My intention is to have a program write a
postscript file to be printed. I have the cookbook, and can understand
several of the examples given there, but I don't understand the lines
above and below the commands, that start with %% (I looked at a ps file
after all of mine printed out as plain text.) Could someone direct me to
a website / book that explains the format of the header, or a FAQ where I
could read up on this ?

For instance, for this example from the cookbook:

newpath
  144 72 moveto
  144 432 lineto
stroke
showpage

what headers does it take to have the line print out, and not the text ?

Thank you,
Stephen


======================================================================
'God opposes the proud, but gives grace to the humble.'
                                                          James 3 : 6b
----------------------------------------------------------------------
 |      UCS is not responsible for any opinions contained here      |
====================******************************====================



Tue, 26 Sep 2000 03:00:00 GMT  
 script headers

Try adding

%!PS-Adobe

as the first line in the file.  It sounds as though you have an
autoswitching printer that isn't getting clued in that this is
<thump,thump, anybody home in there? hello?> POSTSCRIPT! <g>

--
Steve Rindsberg, Prez, RDP (a slide imaging service)
Microsoft MVP, Lotus L-Team
http://www.rdpslides.com
Please direct newsgroup replies to the newgroup, where I'm a volunteer
NOT to Email, where I charge for private consultations.



Quote:
> Hi, I am new to postscript. My intention is to have a program write a
> postscript file to be printed. I have the cookbook, and can understand
> several of the examples given there, but I don't understand the lines
> above and below the commands, that start with %% (I looked at a ps file
> after all of mine printed out as plain text.) Could someone direct me to
> a website / book that explains the format of the header, or a FAQ where I
> could read up on this ?

> For instance, for this example from the cookbook:

> newpath
>   144 72 moveto
>   144 432 lineto
> stroke
> showpage

> what headers does it take to have the line print out, and not the text ?

> Thank you,
> Stephen


> ======================================================================
> 'God opposes the proud, but gives grace to the humble.'
>                                                      James 3 : 6b
> ----------------------------------------------------------------------
>  |      UCS is not responsible for any opinions contained here      |
> ====================******************************====================



Wed, 27 Sep 2000 03:00:00 GMT  
 script headers

Thank you very much. It worked !

=> Try adding
=>
=> %!PS-Adobe
=>
=> as the first line in the file.  It sounds as though you have an
=> autoswitching printer that isn't getting clued in that this is
=> <thump,thump, anybody home in there? hello?> POSTSCRIPT! <g>
=>
=> --
=> Steve Rindsberg, Prez, RDP (a slide imaging service)
=> Microsoft MVP, Lotus L-Team
=> http://www.rdpslides.com
=> Please direct newsgroup replies to the newgroup, where I'm a volunteer
=> NOT to Email, where I charge for private consultations.
=>
=>


=> > Hi, I am new to postscript. My intention is to have a program write a
=> > postscript file to be printed. I have the cookbook, and can understand
=> > several of the examples given there, but I don't understand the lines
=> > above and below the commands, that start with %% (I looked at a ps file
=> > after all of mine printed out as plain text.) Could someone direct me to
=> > a website / book that explains the format of the header, or a FAQ where I
=> > could read up on this ?
=> >
=> > For instance, for this example from the cookbook:
=> >
=> > newpath
=> >   144 72 moveto
=> >   144 432 lineto
=> > stroke
=> > showpage
=> >
=> > what headers does it take to have the line print out, and not the text ?
=> >
=> >
=> > Thank you,
=> > Stephen
=> >
=> >

=> > ======================================================================
=> > 'God opposes the proud, but gives grace to the humble.'
=> >                                                        James 3 : 6b
=> > ----------------------------------------------------------------------
=> >  |      UCS is not responsible for any opinions contained here      |
=> > ====================******************************====================
=> >
=> >
=>
=>


======================================================================
'God opposes the proud, but gives grace to the humble.'
                                                          James 3 : 6b
----------------------------------------------------------------------
 |      UCS is not responsible for any opinions contained here      |
====================******************************====================



Wed, 27 Sep 2000 03:00:00 GMT  
 script headers

Quote:

>Try adding

>%!PS-Adobe

>as the first line in the file.  It sounds as though you have an
>autoswitching printer...

Strictly speaking the first line should be one of:

%!PS-Adobe-3.0 EPSF-3.0
if and only if the file is EPS (which means, of course, it should not
be going to a printer; version numbers may vary);

%!PS-Adobe-3.0
if and only if the file is a printable file that conforms to the Adobe
Document Structuring Convention; this form of header asserts that, so
if the document then happens not to conform, it may be misprocessed.
Version numbers may vary and don't reflect PostScript language level.

%!
if the file is a PostScript file and not DSC conformant, as most
beginners (or even professional's) files are (not).

In fact, your suggestion

%!PS-Adobe

is interpreted as the third case and so should work fine.
----------------------------------------

Visit http://www.*-*-*.com/ ,
PSAlter, psalters, tea, and small {*filter*} animals. And stuff.  



Thu, 28 Sep 2000 03:00:00 GMT  
 script headers

Quote:

> %!PS-Adobe-3.0
> if and only if the file is a printable file that conforms to the Adobe
> Document Structuring Convention; this form of header asserts that, so
> if the document then happens not to conform, it may be misprocessed.
> Version numbers may vary and don't reflect PostScript language level.

> %!
> if the file is a PostScript file and not DSC conformant, as most
> beginners (or even professional's) files are (not).

You know that, I know that, but the printer evidently doesn't and MS sure
as heck has never/will never get it right, and it printed.  I rest my case.
<g>

(but concede the finer points to the gentleman in the wizard's cap)



Fri, 29 Sep 2000 03:00:00 GMT  
 script headers

Quote:

> In fact, your suggestion

> %!PS-Adobe

> is interpreted as the third case and so should work fine.

For Unix users, the script invoked behind the scenes when you print
might be testing for you.  On HP-UX 9.07, the /etc/magic file specifies
the string %!PS-Adobe- to determine that the file to be printed
is already PostScript.  On Solaris 2.5.1 it is %!
--
Charles G. Margolin                   DSSD Internal Information Services




Fri, 29 Sep 2000 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. how to script page settings (header/footer, margins) before printing

2. Script for header includes

3. unknown header name? for readline script on Opentextfile

4. set an HTTP request header variable using client side script

5. printing header/footer field codes & in-line headers/footers

6. use referring header information

7. creating custom http headers in IE5- NOT in ASP Response

8. Header/Footer

9. Postscript Headers Print and Mess Up Report Layout

10. Overlay Header in PostScript

11. Postscript Headers and Footers

12. a2ps headers messup only piping to distiller/pstops

 

 
Powered by phpBB® Forum Software