[juneau-lug] Re: interesting .pdf note

  • From: Nels Tomlinson <nelstomlinson@xxxxxxx>
  • To: juneau-lug@xxxxxxxxxxxxx
  • Date: Wed, 02 Oct 2002 20:41:43 -0800

Yes, Postcript is a full-fledged language.  Malicious postscript is 
nothing new, although back in the day it was mostly strings which 
required someone to go power-cycle the printer.  The buffer overflows in 
gv are new, but I guess we shouldn't be surprised.  If folks would just 
write in lisp ...

Postscript is a stack-based, postfix language.  So, to add 2+2, you 
would say something along the lines of 2 2 +.  It sort of reminds me of 
Forth, or of the HP calculators.

Don Lancaster did a series on postscript programming in Computer Shopper 
back in the mid-80's.  That was my only exposure to it until recently. 
It's useful to know a little about the language so you can edit 
postscript files, to fix bad bounding boxes and so on.

I can't remember if Postscript has commands for working with files.  If 
it does, even fixing that buffer overflow in gv might not entirely 
defang pdfs.

Here are some resources for anyone who's interested in postscript:

A tutorial to get you started writing postscript programs:
www.kanga.nu/~claw/docs/ThinkingInPostScript.pdf
and at
http://www.rightbrain.com/pages/books.html


``Hello, World'' in Postscript, tutorials and more books:

http://www.geocities.com/SiliconValley/5682/Programming.html

A tutorial on using Python and some libraries to generate PDF documents 
on-the-fly.  The author talks about servers, but this could work out for 
other tasks, too.
http://www-106.ibm.com/developerworks/linux/library/l-sc6.html

Nels


James Zuelow wrote:
> Here's an interesting one. PostScript is actually more than just a page
> description language, describing fonts and spacing, etc. You can program
> with it. (There is a PostScript web server for example - I'll look it up
> if anyone is interested.)
> 
> There's a downside though.  Many people think of PostScript documents
> and .pdf files as "inert" (sorry, I couldn't think of a better word).
> However most .pdf readers are full fledged PostScript interpreters.
> 
> Here's the link:
> 
> [link may wrap]
> http://www.infoworld.com/articles/hn/xml/02/09/27/020927hnpdfs.xml?s=IDGNS
> [link may wrap]
> 
> Cheers,
> 
> James
> 
> 
> ------------------------------------
> This is the Juneau-LUG mailing list.
> To unsubscribe, send an e-mail to juneau-lug-request@xxxxxxxxxxxxx with the 
> word unsubscribe in the subject header.
> 


------------------------------------
This is the Juneau-LUG mailing list.
To unsubscribe, send an e-mail to juneau-lug-request@xxxxxxxxxxxxx with the 
word unsubscribe in the subject header.

Other related posts: