views:

31

answers:

1

For one of my projects I need to make PostScript files available for viewing online, My goal is to convert these PostScript files to HTML. I'd like to do it all in VB.NET code and in-memory stream and without using command-line programs.

I think a perfect solution might be to write the PostScript to a stream, and simultaneously read the output stream to HTML file before writing it to a DB.

Let me know if I am on the right track, and if you have any suggestions on how to achieve this.

+2  A: 

I think you'd be much better off converting PS to PDF or to PNG. Even extracting just the text in a PS file is a difficult problem unless you know how the PS is generated and can hack an extraction.

lhf
+1. One of the problems of trying to parse PostScript is that PostScript is a Turing-complete programming language. Text does not always have to appear within `(` and `)`, it can be generated (page numbering for example).
dreamlax
Can I just specifies the X,Y position for each element then just convert the coordinates into a point?
Mcdevitt