Commons:Graphics village pump/March 2019

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Import a vector image

Hello, I'm trying to import the left image from figure 1 (page 3) of this document in vector format. I managed to crop the figure with Inkscape but when I try to import the result to Commons, I always get an error that says "The XML in the imported file could not be parsed." I don't understand what's going on. Could someone import this image (in vector format) for me? Thank you in advance. Pamputt (talk) 12:16, 3 March 2019 (UTC)

@Pamputt: Hi. It seems like the PDF contains a special font, in which the first n glyphs correspond to various symbols. When Inkscape replaces those glyphs with text nodes, their content ends up being non-printable characters, which break the XML parsing. Inkscape has a PDF import mode (Poppler/Cairo import), which replaces all text with paths. It generates much larger, more difficult to edit SVGs, but circumvents this particular issue. TilmannR (talk) 14:30, 3 March 2019 (UTC)
Many thanks TilmannR. And thank you for the explanation. Pamputt (talk) 14:33, 3 March 2019 (UTC)

Black boxes in SVGs

So I uploaded two maps: File:2016 OR HD-56.svg and File:2016 OR HD-54.svg. But, black boxes are shown over the text when they're converted to PNG. I guess this is a flow text issue and I did what they recommended to fix it (text->convert to text on Inkscape), but still it was the same. I'd appreciate if someone could try to fix this issue. MB298 (talk) 21:52, 17 March 2019 (UTC)

@MB298: The problem ist there is an empty <flowRootthat has to be removed. Empty flowRoots cant be marked by clicking on them (they are invisible) and some can't get converted by Inkscape.
You can save them as "Optimized SVG (*.svg)" and then you can use https://toolsadmin.wikimedia.org/tools/id/svgworkaroundbot.
https://toolsadmin.wikimedia.org/tools/id/svgworkaroundbot is quite new (came out on Monday) and can't process "Inkscape SVG (*.svg)" (might get implemented).
If you what to check if it worked you can use Commons:Commons_SVG_Checker (or https://tools.wmflabs.org/svgcheck/index.php)
If you have any problems I can help you. (How to repair, or repair it on my own.)
 — Johannes Kalliauer - Talk | Contributions 22:46, 17 March 2019 (UTC)
@JoKalliauer: I can't really figure out how to use your SVG tool. There isn't anywhere to upload the file. MB298 (talk) 02:38, 18 March 2019 (UTC)
@MB298: Sorry wrong link. Now the correct one: https://tools.wmflabs.org/svgworkaroundbot/  — Johannes Kalliauer - Talk | Contributions 07:41, 18 March 2019 (UTC)
Now I also implemented to process "Inkscape SVG (*.svg)", so now also the original file should work.  — Johannes Kalliauer - Talk | Contributions 16:47, 18 March 2019 (UTC)
Looks like someone already fixed the issue, but thanks. MB298 (talk) 22:18, 18 March 2019 (UTC)