svg2pdf.js

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

Svg2pdf.js Alternatives

Similar projects and alternatives to svg2pdf.js

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better svg2pdf.js alternative or higher similarity.

svg2pdf.js reviews and mentions

Posts with mentions or reviews of svg2pdf.js. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-13.
  • Is node the right choice for HTML to PDF conversion?
    6 projects | /r/node | 13 Jan 2023
    You should check out Vercel's Satori package. You can generate SVGs from JSX without a chromium instance. Pair that with something like https://github.com/yWorks/svg2pdf.js/ and you might be onto something.
  • Forking Chrome to Turn HTML into SVG
    8 projects | news.ycombinator.com | 13 Nov 2022
  • What's a good way to deliver printable reports?
    3 projects | /r/sveltejs | 6 Aug 2022
    If you need to print to exact dimensions, you MUST use PDF. This was what i needed, so I draw everything to an SVG, and made sure that my units were in "pt" (that is 1px = 1/72inch). When creating the PDF, I specified that the units were in "pt" and used https://github.com/yWorks/svg2pdf.js/ to convert the SVG. Note that this has major disadvantages. SVG does not support word wrap by default; you'll have to write your own. You'll also have to get users to specify a paper size in your app. Again, test, test, test. If you want to preview the PDF, not all browsers can display PDF natively (looking at you Android)! Some browsers won't print exact size even in PDF (Android). Some browsers will reduce page margins if printing from an inline iframe preview (Safari). You need annoying workarounds. Like downloading instead of previewing the file on Android, or making sure to always open a new tab on Safari.
  • Creating a PDF
    2 projects | /r/sveltejs | 2 Aug 2022
    I used it with https://github.com/yWorks/svg2pdf.js/ which makes it easy to draw diagrams too.
  • Guest WiFi using a QR code
    6 projects | news.ycombinator.com | 12 Jul 2022
    Hmm, after tinkering around a bit, I think according to https://github.com/yWorks/svg2pdf.js/issues/82 , the mask element in the giraffe SVGs is not supported in the PDF converter. It is just dropped, leafing the qraffe rather qr-less.

    But I sadly know neither svg enough to think up an alternative approach, or a JS/TS dev enough to see if there are other libraries.

  • A note from our sponsor - WorkOS
    workos.com | 19 Apr 2024
    The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →

Stats

Basic svg2pdf.js repo stats
5
622
5.8
12 days ago

yWorks/svg2pdf.js is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of svg2pdf.js is TypeScript.

The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
workos.com