Hacker News new | past | comments | ask | show | jobs | submit login

If you want to convert a postscript file (or .eps) to PDF you can use ImageMagick:

  convert -density 300 input.ps -quality 100 output.pdf
If you're interested in this kind of thing, I packaged a lot of functionality (including zip files) into an open source doc viewer called "chai" (that also works on mac, install deps via brew).

Please note its focus is on security rather than looks so it converts docs to page images that you then view in (an optionally local) web client.

You can easily modify the convert process to move it to PDF rather than page images tho. Check it out: https://github.com/dosyago/chai




At a quick glance that looks like it will rasterize the vectors, which is usually not what you want to do with an EPS.


Good point! I will investigate that, even it's not relevant to my chai app I think it's interesting and worthwhile to know if the convert command will do that!

edit: ChatGPT thinks you might be right! It also says: If you specifically need to maintain the vector properties of the EPS file when converting to PDF, you might want to use a tool designed to work with vector formats, such as epstopdf, which is a utility that comes with most TeX distributions.


TCPDF has full support for rendering an EPS into a PDF.

It can be fussy.

https://tcpdf.org/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: