For the ghostscript thing, and for the record (noting that, in this
area, I have put my code-money where my mouth is):

I too want to get rid of Ghostscript. The path adopted is the
TeX/METAFONT way with the following:

- A PostScript interpreter can be, functionnally, divided in two
parts: 1) a general purpose language allowing computation but aimed
for images and supposed, finally, to produce primitive graphics
directives (fixed results); 2) a rasterizer to produce a matricial
image;

Converting pdf and ps to svg and rendering svg is the simpler approach. During the first time I used this method I just added a linux computer to my network and made use of pdftocairo with svg export. The advantage of this method is that the resulting container kept page information and also all glyphs are embedded in the resulting svg file which than gets rendered by a tiny svg renderer.

Substituting ghostscript with a new interpreter wasn't worth the effort in my case. By reading the pdf metadata you also can keep the outline and other information.