Saving Plain SVG with viewBox extension

Bug #169966 reported by Strank-users on 2007-08-07
6
Affects Status Importance Assigned to Milestone
Inkscape
Wishlist
Unassigned

Bug Description

This is a small and simple output extension (in Python) that provides for
saving Plain svg, without width and height attributes. Instead it adds a
viewBox.

Such svg files are actually scalable when embedded in websites.

I use this as a stop-gap measure until the standard svg output method
supports options for different width/height viewBox combinations (and
preserveAspectRatio).

(to use: put both files into share/extensions/)

cheers,
stefan

Related branches

Strank-users (strank-users) wrote :

Originator: YES

File Added: svg_viewBox_output.inx

vonHalenbach (lustik) wrote :

Thank you for this extention!

Changed in inkscape:
importance: Undecided → Wishlist
status: New → Triaged
Martin d'Anjou (point14) wrote :

I uploaded a modification to the extension proposed above. It uses org.inkscape.output.svg.inkscape instead or org.inkscape.output.svg.plain. I do not claim to understand how this whole thing works, but I can see that the "plain" format has stores much less information in the file and I wanted to keep that information.

My uploads are called svg_viewBox_output2.inx and svg_viewBox_output2.py so they can be installed without interfering with the other one.

Martin d'Anjou (point14) wrote :

The second upload.

jazzynico (jazzynico) wrote :

The upcoming 0.48 version already (committed yesterday!) has an Optimized SVG output (scour.py) which can replace width and height by a viewbox, almost exactly the same way you did (with some extra tests).
Anyway, thanks for this update and the time spent improving it!

Changed in inkscape:
milestone: none → 0.48
status: Triaged → Fix Committed
jazzynico (jazzynico) on 2010-08-24
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions