README.md in prawn-svg-0.15.0.0 vs README.md in prawn-svg-0.16.0
- old
+ new
@@ -4,22 +4,25 @@
This will take an SVG file as input and render it into your PDF. Find out more about the Prawn PDF library at:
http://wiki.github.com/sandal/prawn/
+prawn-svg is compatible with all versions of Prawn from 0.8.4 onwards, including the version 1.0 series.
+
## Using prawn-svg
```ruby
Prawn::Document.generate("svg.pdf") do
svg svg_data, :at => [x, y], :width => w
end
```
<tt>:at</tt> must be specified.
-<tt>:width</tt>, <tt>:height</tt>, or neither may be specified; if neither is present,
-the resolution specified in the SVG will be used.
+Either <tt>:width</tt>, <tt>:height</tt>, or neither may be specified; if neither is present,
+the dimensions specified in the SVG will be used, or if the dimensions aren't specified, it'll
+fit to the space available on the page.
<tt>:cache_images</tt>, if set to true, will cache images per document based on their URL.
<tt>:fallback_font_name</tt> takes a font name which will override the default fallback font of Times-Roman.
If this value is set to <tt>nil</tt>, prawn-svg will ignore a request for an unknown font and log a warning.
@@ -48,14 +51,18 @@
- <tt><clipPath></tt>
- attributes/styles: <tt>fill</tt>, <tt>stroke</tt>, <tt>stroke-width</tt>, <tt>opacity</tt>, <tt>fill-opacity</tt>, <tt>stroke-opacity</tt>, <tt>transform</tt>, <tt>clip-path</tt>
+ - the <tt>viewBox</tt> attribute on the <tt><svg></tt> tag
+
+ - the <tt>preserveAspectRatio</tt> attribute on the <tt><svg></tt> and <tt><image></tt> tags
+
- transform methods: <tt>translate</tt>, <tt>rotate</tt>, <tt>scale</tt>, <tt>matrix</tt>
- colors: HTML standard names, <tt>#xxx</tt>, <tt>#xxxxxx</tt>, <tt>rgb(1, 2, 3)</tt>, <tt>rgb(1%, 2%, 3%)</tt>
- - measurements specified in <tt>pt</tt>, <tt>cm</tt>, <tt>dm</tt>, <tt>ft</tt>, <tt>in</tt>, <tt>m</tt>, <tt>mm</tt>, <tt>yd</tt>, <tt>%</tt>
+ - measurements specified in <tt>pt</tt>, <tt>cm</tt>, <tt>dm</tt>, <tt>ft</tt>, <tt>in</tt>, <tt>m</tt>, <tt>mm</tt>, <tt>yd</tt>, <tt>pc</tt>, <tt>%</tt>
- fonts: generic CSS fonts, built in PDF fonts, and any TTF fonts in your fonts path
## CSS