Page 1 of 1

output pdf images?

Posted: July 17th, 2022, 4:09 pm
by m.andreae@mpic.de
I am using the current version of hysplit, which creates html files as output. How can I still make vector graphics pdf files?

Re: output pdf images?

Posted: July 18th, 2022, 7:28 am
by sonny.zinn
Converting HYSPLIT plots in html to pdf is a two step process. First, the splitsvg program included in the HYSPLIT distribution is employed to extract svg plots embedded in html. For example, extracting svg plots from concplot.html is done:

..\exec\splitsvg -iconcplot.html -oconcplot.svg

which will produce F01-concplot.svg, F02-concplot.svg, etc. for the first frame (or plot), the second, etc.

Conversion of svg to raster image pdf is simple by using the convert program from ImageMagick, for example, convert F01-concplot.svg trajplot.pdf. However, I am not sure about conversion to vector graphics pdf. A web article suggests to use cairosvg.

Re: output pdf images?

Posted: July 18th, 2022, 7:20 pm
by m.andreae@mpic.de
Hi-, and thanks for the instructions.
In the meantime, I figured out that it can also be done in the gui. If you go Concentration => Utilities => SVG to Image, you get a default output file that is concplot.gif. If you simply change the ".gif" to ".pdf", it produces a pdf file! The resulting file is, however, a raster graphics file.

SVG is actually a vector format, so it seems the best way to get a vector pdf is to extract the svg from the html, as you suggested, and the import the svg into Adobe Illustrator, from where it can be saved as pdf.