LibRSVG is probably one of well known svg library (other is Batik), the library use libcairo for pdf,ps and svg backend. This is a convenient static build of RSVG-Convert (part of librsvg 2.34.2) compiled with MinGW. I made this since originally the executable would dragged many dependencies.
The command line also used by ImageMagick through delegates although being deprecated (the rsvg wrapper), currently rsvg-convert.exe support png, ps, pdf and xml output but not jpg.
use "rsvg-convert --help" to see its command options, notice that the default output is stdout so be sure to specify file output.
version 2.36.4: rsvg-convert.exe (last update: 07-06-2013)
Hello,
ReplyDeletei've got some warning using your tool :
(rsvg-convert.exe:12340): Pango-WARNING **: error opening config file 'E:/msys/MSYS/local/rsvg/etc/pango\pangorc': Permission denied
and some error about fonts :
(rsvg-convert.exe:12340): Pango-WARNING **: couldn't load font "MS Shell Dlg Not-Rotated 2.439453125", falling back to "Sans Not-Rotated 2.439453125", expect ugly output.
(rsvg-convert.exe:12340): Pango-WARNING **: couldn't load font "MS Shell Dlg Not-Rotated 2.7998046875", falling back to "Sans Not-Rotated 2.7998046875", expect ugly output.
(rsvg-convert.exe:12340): Pango-WARNING **: couldn't load font "MS Shell Dlg Not-Rotated 2.9677734375", falling back to "Sans Not-Rotated 2.9677734375", expect ugly output.
(rsvg-convert.exe:12340): Pango-WARNING **: couldn't load font "MS Shell Dlg Not-Rotated 2.8154296875", falling back to "Sans Not-Rotated 2.8154296875", expect ugly output.
(rsvg-convert.exe:12340): Pango-WARNING **: couldn't load font "MS Shell Dlg Not-Rotated 2.8798828125", falling back to "Sans Not-Rotated 2.8798828125", expect ugly output.
Anyway, your tool works well, thank you !
Thierry
the first error message are harmless it's not needed for windows, the warnings also generally can be ignored. But if you concerned (your text output not looking good). Try download this http://osspack32.googlecode.com/files/fontconfig.7z extract it to where you have rsvg and execute fc-cache (it will cache your whole windows's fonts), it may takes time to finished. Then try again rsvg
Deletenote: I'm not sure whether my previous build has fontconfig support, so I updated it (version 2.36.1) as the same link in original post. try redownload
Hello,
ReplyDeleteyour update remove the first error, thank you !
For the others, the text output seems ok, so I keep the actual fonts, but in case of, I will apply your solution.
Regards
Thierry
Hi TumaGonx Zakkum,
ReplyDeleteThank you very much for this static build. I wish you could keep it up to date.
Really useful, thanks! I'm having incompatibility issues between MediaWiki (librsvg) and Inkscape, and this allows me to test out my changes without needing to keep re-uploading duff images to MediaWiki.
ReplyDeletemaybe you just need rsvg-viewer? http://osspack32.googlecode.com/files/rsvg-view-3.exe
Deletedrag n drop svg on it or associate it with svg
Interesting, thanks. Only snag is, the window doesn't open to the size of the document, and twice within the last few minutes I've crashed the program simply enlarging the size of the window using the size grip. (Windows 8 Pro)
DeleteCertainly easier than repeatedly saving to PNG though :)
(PS your OpenID system doesn't work. "Your OpenID credentials could not be verified. Makes no effort to actually check; it just can't be bothered, and gives up.)
Have you downloaded the latest (same link)? the not open to size issue have been fixed AFAIK.
DeleteAbout the openID, i'm not sure if I can do anything about it, I think it's part of blogspot? Sorry about it
Ah yes, on some svgs there is 20-30px missing from the window. Can't confirm about windows 8 crash though
DeleteSame crash in XP SP3 32-bit:
Deletehttp://telcontar.net/store/hosted/bugs/rsvg-view_crash.png
Randomly crashes when enlarging the window, as you can see from the above. Might be image dependent. You can contact me via my website if you want me to try test builds etc.
Maybe because I'm not enabling "Show windows contents while dragging" desktop setting. But still, this is a bug (for GTK-3)
DeleteThanks. Very useful.
ReplyDeletethank you very much! long ago I was looking for svg to png converter, it is best to have a few kb
ReplyDeleteHi,
ReplyDeleteI've downloaded the exe. When I'm running it, it opens the win cmd and do nothing.
Any clue?
1. open the commandline "cmd"
Delete2. CD to the DIR of the EXE
3. try something like this or what ever you wanted to do:
rsvg-convert.exe -a -w 500 -f svg INPUT.SVG -o OUTPUT.SVG
Hi,
ReplyDeleteI tried to get the help as you have mentioned. But i get the following error
D:\ImageMagick>rsvg-convert.exe -help
Missing argument for -h
notice the commandline use two dash "--help"
DeleteThanks for the quick reply.. works like a charm.
DeleteAwesome tool..
ReplyDeleteBy the way, I can't convert an eps file using this right?
when I tried, I am getting
Error reading SVG:Error domain 1 code 4 on line 1 column 1 of file:///D://eps/Template2.eps: Document is empty
It clearly says, Error reading SVG. :)
Hi,
ReplyDeleteDoes this support embedding external images?
I have an svg file with 'image' tag which was not rendered by this program. All I see in the output is text.
Haven't tried that myself, maybe this help http://stackoverflow.com/questions/2961624/rsvg-doesnt-render-linked-images
ReplyDeleteI've begun to use rsvg-convert for text-based SVG, and it's wonderful.
ReplyDeleteHowever, my svg has an image embedded in it using the form of:
image
height = "100"
width = "100"
x = "455"
xlink:href = "data:;base64,{imageDataInBase64}"
y = "90"
My image is not getting into the PDF. Is rsvg-convert unable to process images?
Help!
Hi,
ReplyDeleteYour rasterizing utility is excellent.
However, I have observed that applying various desired dpi densities in command-line parameters, like this:
rsvg-convert.exe -d 300 -p 300
rsvg-convert.exe -d 100 -p 100
rsvg-convert.exe -d 600 -p 600
or like this
rsvg-convert.exe --dpi-x 600 --dpi-y 600
or even without specifying density which should default to 90:
rsvg-convert.exe
HAS NO EFFECT.
Moreover, the effect is (what I'm verifying by examining obtained raster image geometry comparing with SVG contents) as in all cases, density of 300 dpi has been used.
Obtained PNG files with various settings are binary identical.
After some experiments, I've observed that the only method to control effective resolution, is to pass width and height parameters recalculated accordingly. For example, to obtain 600 dpi, it is necessary to pass width and height multiplied twice.
In my application, I have to keep control over raster image geometry so as to have its content in sync with vectors displayed above, so proper behavior in this matter is for me important.
May be there is something wrong in the way I pass density parameters?
Could you explain this behavior, please?
Hi Krzysztof,
DeleteJust to clarify I'm not write this app, I just build unofficial win32 executable like all other stuff in this blog.
I can't help you or confirm this bug at the moment but if you're sure about it, you can filled bugreport to the developer here https://bugzilla.gnome.org/browse.cgi?product=librsvg. They're the right person to talk about it :)
Thank you for fast response.
DeleteI've found following issue at bugzilla:
There is no difference between different DPIs
https://bugzilla.gnome.org/show_bug.cgi?id=681127
that seems to point to the same problem, but with no answer.
I'll try to post my own one.
Regards,
This comment has been removed by the author.
ReplyDeleteThx for making this wonderful conversion tool. But I have 2 major issues. 1) When converting to PDF, the opacity value in the or elements are ignored. 2) The conversion fails to apply bold or italic styles for some font such as WenQuanYi Zen Hei (文泉驛正黑).
ReplyDeleteThanks, librsvg 2.40 released few days ago, will see if I can do something about the bug when updating the win32 binary.
DeleteSorry my previous comment was incomplete. For the PDF conversion, I mean the opacity property in "g" and "text" elements are ignored. This isn't the problem when converting to PNG.
DeleteFor the bold and italic font, your conversion tool reports that it can't find "WenQuanYi Zen Hei bold" or "WenQuanYi Zen Hei italic", but this problem doesn't exist in Wikimedia which uses the same typeface.
Hi, thanks for this. I have the same problem with failure to open 'E:/msys/MSYS/local/rsvg/etc/pango\pangorc': etc but in my case, since E: is my optical drive, I get a while bunch of windows warning dialogs saying "there is no disk in the drive please insert a disk". Not usable in that case. Thanks.
ReplyDelete