Svg2pdf.js Versions Save

A javascript-only SVG to PDF conversion utility that runs in the browser. Brought to you by yWorks - the diagramming experts

v2.2.3

5 months ago

#279: Fix elements referencing path elements with no contents (empty d attribute)

v2.2.2

9 months ago
  • #266: Fix inheritance of positional attributes (dx, dy) for nested tSpans
  • #268: Accept newlines in Base64 encoded data urls
  • #271: Don't stroke text if stroke-width=0
  • #274: Properly cleanup measurement elements in document.body

v2.2.1

1 year ago

Make getAttribute safer

v2.2.0

2 years ago

This release mainly brings some bugfixes and the support for numerical font weights.

  • #181: add support for numerical font weights
  • #188: fix rendering two SVGs with the same ids in the same PDF document
  • #187: fix exception when parsing CSS with @import rules
  • #186: fix rendering elements with empty or invalid clip-path attribute
  • #185: fix gradients with zero or one stop
  • #184: fix bounding boxes and attribute inheritance for <marker> elements

v2.1.0

3 years ago

Added support for some awesome new features thanks to @Mrfence97. Also thanks to the other contributions in context of the Hacktoberfest!

  • #158: Add support for currentColor
  • #160: Add support for the textLength attribute
  • #161: Add support for nested <tspan>s. Also fixed some text positioning issues.

v2.0.0

3 years ago

Awesome major release with many cool new features.

  • Major rewrite in TypeScript
  • The Public API has changed:
    • svg2pdf is now a proper plugin for jsPDF. You can use doc.svg(...) instead of svg2pdf(element, doc) now. jsPDF is now a peer dependency.
    • The call is now asynchronous and returns a promise.
    • Replaced the scale option with width and height options.
    • Renamed x/yOffset to x/y

New Features:

  • ES2015 modules and UMD module bundles.
  • Typescript support through typings file.
  • #118: Support CSS style sheets: <style> elements, <link> elements, xml-stylesheets, and inline styles.
  • #115: Support for <symbol> elements.
  • #111: Support "evenodd" fill rule.
  • #142: Correctly clip at viewport established by SVG elements.
  • #113: Support both 'gray' and 'grey' as simple color name

Bugfixes:

  • #101: Fix font-size when using a jsPDF document with a unit other than "pt"
  • #112: Fix relative units in font sizes.
  • #140: Fix rounded rects when either rx or ry is omitted; better output for regular rects.

v1.5.0

4 years ago
  • Add support for fill-rule attribute
  • update jspdf dependency

v1.4.0

4 years ago
  • Many bugfixes
  • Added support for stroke and stroke-width attributes on text/tSpan attributes

v1.3.4

5 years ago
  • fixed invisibility bugs for clipPath elements
  • fix title element within text
  • add support for some SVG 2.0 css properties
  • fix CSS/attribute precedence
  • fix gradient stop offsets with percentage values

v1.3.3

5 years ago

Fix a bug where references inside an inline SVG image would result in an exception.