Monday, December 11, 2006

postscript to html (ps2html)

Ever needed to convert postscript (ps) files to html? I had to. I needed to convert a batch of ps files to html. I looked around a lot, but failed. Could not find a good tool to get this done. Next choice was to write one. I worked on it over the week end, but failed. Got too lazy at a point. I was able to convert the text to html, but when it came to the formating it was a pain. The tool worked fine when I needed to export just the text, but with the formating; it was a pain. So I looked for other alternative solutions. The best choice was to use 2 simple tools that came with most *nix's. ps2pdf and pdftohtml. The first one converted the file to pdf the next from pdf to html. I could not find any good tools to directly convert from ps to html. The only issue I found with pdftohtml is that it does not convert Unicode characters well. Some how that is messed up, besides that no issues.
pdftohtml -c -noframes -zoom 5 -i file.pdf
Thats all you need. is the file you need to convert. the result will be file.html

1 comment:

CSharp said...

where can i download these tools to be used?