Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

snapdom-html2pdf-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snapdom-html2pdf-plugin

A starter template for building SnapDOM plugins

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

snapdom html2pdf plugin

A SnapDOM plugin that renders a webpage as a pdf with selectable text and links via html2pdf.js

Install

# npm coming soon....
clone https://github.com/jswhisperer/snapdom-plugin-fullpdf
import { snapdom } from '@zumer/snapdom'
import { html2pdfSnap } from 'snapdom-html2pdf-plugin'
snapdom.plugins([html2pdfSnap, { opts }])

const capture = document.getElementById("capture")
await result.toHtml2pdfSnap({ element: capture, html2pdfSnap })

Options

html2pdf docs

NameTypeDefaultDescription
marginnumber or array0PDF margin (in jsPDF units). Can be a single number, [vMargin, hMargin], or [top, left, bottom, right].
filenamestring'file.pdf'The default filename of the exported PDF.
pagebreakobject{mode: ['css', 'legacy']}Controls the pagebreak behaviour on the page. See Page-breaks below.
imageobject{type: 'jpeg', quality: 0.95}The image type and quality used to generate the PDF. See Image type and quality below.
enableLinksbooleantrueIf enabled, PDF hyperlinks are automatically added ontop of all anchor tags.
html2canvasobject{ }Configuration options sent directly to html2canvas (see here for usage).
jsPDFobject{ }Configuration options sent directly to jsPDF (see here for usage).

License

MIT

Keywords

snapdom

FAQs

Package last updated on 14 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts