TinyURL widget - shorten your URL's for free!

Enter a long URL to make tiny:
Showing posts with label SVGCleaner. Show all posts
Showing posts with label SVGCleaner. Show all posts

Thursday, March 5, 2015

How to clean inkscape SVG files

Inkscape sometimes makes SVG files with forbidden elements in them that epub readers might reject, Google epubchecker does not like inkscape:connector commands and fails with:


Error: Unable to sanitize epub

If you run it locally, it will fail with this error:


ERROR: *.svg(147,2722): attribute "inkscape:connector-curvature" not allowed here; expected attribute "class", "clip-path", "clip-rule", "color", "color-interpolation", "color-rendering", "cursor", "display", "externalResourcesRequired", "fill", "fill-opacity", "fill-rule", "filter", "image-rendering", "marker-end", "marker-mid", "marker-start", "mask", "onactivate", "onclick", "onfocusin", "onfocusout", "onload", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "opacity", "pathLength", "pointer-events", "requiredExtensions", "requiredFeatures", "shape-rendering", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "style", "systemLanguage", "text-rendering", "transform", "visibility", "xml:base", "xml:lang" or "xml:space"



To get around this, download and compile SVG Cleaner.


https://github.com/RazrFalcon/SVGCleaner

https://launchpad.net/~svg-cleaner-team/+archive/ubuntu/svgcleaner

You will also need z7a   (7za-full on Ubuntu)

https://www.ibm.com/developerworks/community/blogs/6e6f6d1b-95c3-46df-8a26-b7efd8ee4b57/entry/how_to_use_7zip_on_linux_command_line144?lang=en