Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert XPS to SVG

Tags:

svg

xps

Is there a direct and fast way to convert XPS (XML Paper Specification) files to SVG format?

I can convert XPS to PDF and then using inkscape to convert them to SVG. But the PDF->SVG step is very time consuming though this process seems is not CPU consuming.

My understanding is that be cause XPS is a vector based format, converting it to another vector based format like SVG must be feasible and much faster than converting raster based format (though i'm not entirely sure pdf is just raster base) to vector based formats.

BTW, the goal is to display vector based images in browser, and I've XPS files.

like image 914
R Pasha Avatar asked Oct 07 '22 18:10

R Pasha


2 Answers

libgxps reads XPS and can create SVG files.

I tried it on Cygwin with the xpstosvg command and worked fine.

like image 85
golimar Avatar answered Oct 10 '22 02:10

golimar


I tried xpstosvg from the answer above to convert an XPS document with about 100 pages. Unfortunately, the tool produced only one large SVG image with about 90 MB file size, which was not exactly what I was looking for, since the file could not be viewed and I needed one image per page.

Also the manual of the program did not give any hint how to get one image per page. In the end I used an online XPS converter, which really created a SVG image for each page.

like image 26
s4s Avatar answered Oct 10 '22 02:10

s4s