Sha256: 161efec30ee942c4e3cd0bb93673a7413f61abb30a2493a03055bc87b2c6a519

Contents?: true

Size: 1.38 KB

Versions: 1

Compression:

Stored size: 1.38 KB

Contents

An SVG renderer for the Prawn PDF library.

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/

Using prawn-svg:

  Prawn::Document.generate("svg.pdf") do
    svg svg_data, :at => [x, y], :width => w
  end
  
:at must be specified.  :width, :height, or neither may be specified; if neither is present,
the resolution specified in the SVG will be used.

prawn-svg is in its infancy and does not support the full SVG specifications.  It currently supports:

- line tag
- polyline tag
- polygon tag
- circle tag
- ellipse tag (although this seems to be buggy)

- rect tag
  supports rounded rects, but only one radius is applied to all corners

- path tag
  supports moveto, closepath, lineto, horiz lineto, vert lineto, curveto, smooth curveto, quad curveto, smooth quad curveto
  does not support elliptical arc

- text tag
  attributes: size, text-anchor
  partially supported attributes: font-family
  
- attributes/styles: fill, stroke, stroke-width, opacity, fill-opacity, stroke-opacity, transform

- transform methods: translate, rotate, scale

- colors: html standard names, #xxx, #xxxxxx, rgb(1, 2, 3), rgb(1%, 2%, 3%)

- measurements specified in pt, cm, dm, ft, in, m, mm, yd

prawn-svg does NOT support CSS classes, named elements, anything in the defs tag, the tspan tag, gradients/patterns or markers.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prawn-svg-0.9.1.3 README