ulisse has asked for the wisdom of the Perl Monks concerning the following question:

Hi. I have to read the data contents of a PostScript but It seems that w/ PostScript-file-1 module I can not do it. Am I wrong? Or Does some other module exist ? thanks ulix

Replies are listed 'Best First'.
Re: PostScript Reading
by DrHyde (Prior) on Jul 29, 2003 at 15:07 UTC
    Postscript is not really a document format, but is a programming language that can be used to generate documents. Taking a trivial example, if you want to print "hello world", a Postscript program (file) might first print the e, then the r, then the h, and so on - in particular you will find with postscript documents generated from (eg) word processors like Word that the order of the words in the file bears little resemblance to their order on the page. It matters not in what order you generate the document provided that the end result is correct. Consequently, you can't easily look at a file containing postscript and divine what the data is. Not without first writing a postscript interpreter.

    I'd suggest that you try looking at Ghostscript, which is a free postscript interpreter. Maybe you can pass your documents to it, let it parse and render them, and look at the results to see what the data was.