mgieseki / dvisvgm

A fast DVI, EPS, and PDF to SVG converter
https://dvisvgm.de
GNU General Public License v3.0
306 stars 33 forks source link

Build only Eps to svg convertor #133

Closed iamtekeste closed 4 years ago

iamtekeste commented 4 years ago

This is not an issue but I didn’t know where else to post it. I would really appreciate your guidance in how to build only the eps to svg convertor, specially I would like to know

  1. What are the required libs for this feature
  2. Which files in the src dir I should be looking at
  3. What is the entry point/file to the eps to svg convertor.

Thank you!

mgieseki commented 4 years ago

There is no easy way to extract the EPS to SVG part from the code because it's built upon the PostScript \special functionality of the DVI to SVG converter. You had to adapt a lot of code lines to isolate the PostScript handler from the \special manager and make it work standalone. It's doable, of course, but requires some effort. The class that handles the direct EPS to SVG conversion is called EPSToSVG. 😃

iamtekeste commented 4 years ago

Thank you for the reply @mgieseki. Is it the same case for the PDF to SVG converter too? Or is it possible to extract that out?

And I love the obvious naming convention :)

mgieseki commented 4 years ago

Is it the same case for the PDF to SVG converter too?

Yes, it's actually almost the same code since Ghostscript allows to process PS and PDF files equally. So, if you extract the (E)PS to SVG converter, you get the PDF to SVG one for free (or vice versa).

iamtekeste commented 4 years ago

Good to know! And thank you for the quick response.