[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: parsing post script

Subject: Re: parsing post script
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 25 Nov 2003 09:47:48 GMT
parse postscript file
  Actually I dont need to render a PS file, but instead I've got to parse an
  existing file and try to make sense out of it, as in, I should be able to
  extract the data.

That requires a full PostScript interpretter and even _with_ a full
postscript interpreter getting a list of words out of a postscript file
is incredibly complex.

Postscript is a full featured programming language with loops, stacks,
arrays, scoping etc so to work out what the "data" is you need to execute
the program, then to work out what are the "words" you need to decide,
based on the output of that program which letters have been typeset
"close together" and in a visible colour. There is no guarantee that the
letters that appear close together on the page are anywhere near each
other in the postscript file as PS can (and often does) use absolute
coordinates to position things at arbitrary points on the page.

ghostscript includes a pstext utility to extract text: it does a
reasonable but not 100% accurate job (and includes the full ghostscript
postscript interpreter).

It is not uncommon for organisations that do this  a lot to use the
low tech, but reliable, technique of taking the postscript, printing it
on paper, and then sending the paper to an XML keyboarding house that
manually rekeys the document and emails it back.

David


-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.