Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4dbdc6a
chore: update dompurify version (#3768)
MarcioMeier Sep 17, 2024
7cc6373
fix: upgrade fflate from 0.4.8 to 0.8.1 (#3666)
MrRio Sep 17, 2024
3e44dfa
fix: upgrade core-js from 3.6.5 to 3.33.0 (#3664)
MrRio Sep 17, 2024
c87016c
[Snyk] Upgrade @babel/runtime from 7.14.6 to 7.23.2 (#3665)
MrRio Sep 17, 2024
caf5159
Prepare 2.5.2 (#3769)
HackbrettXXX Sep 17, 2024
f3c69ad
fix: upgrade @babel/runtime from 7.23.2 to 7.25.6 (#3771)
MrRio Sep 19, 2024
812fc78
remove saucelabs credentials (#3776)
HackbrettXXX Sep 25, 2024
f60dcfa
update action dependency versions (#3777)
HackbrettXXX Sep 25, 2024
637b5d3
Upgrade dompurify to 2.5.6 to 2.5.8 (#3812)
nlqivision Jan 22, 2025
5aad456
fix: upgrade @babel/runtime from 7.25.6 to 7.26.0 (#3822)
MrRio Feb 18, 2025
e2c1818
Bump rollup from 2.21.0 to 2.79.2 (#3826)
dependabot[bot] Feb 19, 2025
7aa332e
fix(sec): remove MSIE support to allow upgrading to vuln-free `dompur…
hainenber Feb 19, 2025
d0c605f
3.0.0
HackbrettXXX Feb 19, 2025
6136d4b
Upgrade canvg from 3.0.6 to 3.0.11 (#3836)
ninooppgeorge Mar 17, 2025
c4b7421
don't use saucelabs in CI to be able to correctly run CI for PRs
HackbrettXXX Mar 17, 2025
b167c43
improve performance of data url parsing in addimage (#3843)
HackbrettXXX Mar 17, 2025
7cf6ddf
fix: upgrade @babel/runtime from 7.26.0 to 7.26.7 (#3832)
MrRio Mar 17, 2025
57cbe94
3.0.1
HackbrettXXX Mar 17, 2025
d8bfc9f
fix: upgrade @babel/runtime from 7.26.7 to 7.26.9 (#3847)
MrRio Aug 21, 2025
7c51caa
Correct the millimeter unit conversion constant in docs (#3872)
WardenDrew Aug 25, 2025
4cf3ab6
Fix parsing corrupt PNG images in the addImage method (#3880)
HackbrettXXX Aug 26, 2025
543b356
3.0.2
HackbrettXXX Aug 26, 2025
064194f
Fix division by zero when calculating word spacing (#3879)
alxndr-pggm Sep 1, 2025
394d1e7
fix scaling of form object bounding boxes (#3888)
HackbrettXXX Sep 16, 2025
9ea590c
fix regressions in PNG encoding that were introduced in 3.0.2 (#3887)
HackbrettXXX Sep 18, 2025
574a941
3.0.3
HackbrettXXX Sep 18, 2025
463b199
fix: upgrade @babel/runtime from 7.28.3 to 7.28.4 (#3895)
MrRio Oct 2, 2025
58b3c78
Fix typos and linguistic errors in documentation (#3897)
survivant Oct 6, 2025
777089a
fix: cell function now properly accepts align parameter (#3896)
vishal-rathod-07 Oct 6, 2025
af7dd5a
remove duplicate function "ga" in webp decoder (#3902)
jvdp Oct 7, 2025
2db3d9d
fix font list cache invalidation issue in context2d module (#3891)
srikanth-s2003 Oct 7, 2025
c10d90c
Fix API.internal.pages not being updated when restoring a RenderTarge…
Opineppes Oct 7, 2025
c768910
add package.json exports field (#3903)
tishajain25 Oct 16, 2025
e080935
Do not add pages dynamically unless autoPaging is enabled (#3915)
anmiles Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 24 additions & 27 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,39 @@
name: Continous Integration
name: Continuous Integration

on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

jobs:
test-saucelabs:
test-browser:
name: Browser tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
cache: npm
- name: npm install
run: npm ci
- name: Build
run: npm run build
- name: Run tests
run: npm run test-saucelabs
env:
SAUCE_USERNAME: jspdf
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}
run: npm run test-ci

test-node:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 10 # minimum supported version
- 14 # current LTS
- 16 # latest
- 20 # current LTS
- 22 # latest
name: Node.js ${{ matrix.node-version }} test
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand All @@ -53,22 +49,23 @@ jobs:
strategy:
matrix:
ts-version:
- '3.0'
- '4.0'
- 'latest'
name: Typings tests (typescript@${{ matrix.ts-version }})
- { ts: '4.0', types-node: '17' }
- { ts: 'latest', types-node: '20' }
name: Typings tests (typescript@${{ matrix.ts-version.ts }})
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
cache: npm
- name: npm install
run: npm ci
- name: Install typescript@${{ matrix.ts-version }}
run: npm install typescript@${{ matrix.ts-version }}
- name: Install typescript@${{ matrix.ts-version.ts }}
run: npm install typescript@${{ matrix.ts-version.ts }}
- name: Install @types/node@${{ matrix.ts-version.types-node }}
run: npm install @types/node@${{ matrix.ts-version.types-node }}
- name: Run tests
run: npm run test-typings

Expand All @@ -77,11 +74,11 @@ jobs:
name: Lint
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
cache: npm
- name: npm install
run: npm ci
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 12
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/stale@v3
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.'
Expand Down
4 changes: 0 additions & 4 deletions .sauce.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ preparing a pull request please follow these guidelines:
- You may now (and should!) use modern JavaScript everywhere. The build step will transpile it. Most of the sources
are still in ES5, but all new code should be written in ES6+.
- When using newer EcmaScript or Browser APIs make sure the required polyfills are listed in
`src/polyfills.js`. At the moment, the library must still run in IE11!
`src/polyfills.js`.
- Run `npm run prettier` before committing.
- Don't update the files in `dist` in regular pull requests. These are usually only updated when creating a new release.
- For the commit message, follow these guidelines:
Expand Down
4 changes: 2 additions & 2 deletions HOTFIX_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ correct scale.
To enable this hotfix, supply a 'hotfixes' array to the options object in the jsPDF constructor function, and add the
string 'px_scaling' to this array.

#Accepted Hotfixes
# Accepted Hotfixes

## scale_text

Expand Down Expand Up @@ -63,4 +63,4 @@ Filling paths
### Description

In certain cases, closing a fill would result in a path resolving to an incorrect point.
The was most likely fixed when we refactored matrix logic. Enabling this hotfix will ignore a most-likely unneeded workaround.
This was most likely fixed when we refactored matrix logic. Enabling this hotfix will ignore a most-likely unneeded workaround.
2 changes: 1 addition & 1 deletion ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Feature requests, bug reports etc. are very welcome as issues. But questions are

If you are facing issues with garbled Unicode characters, please refer to [#2677](https://github.com/MrRio/jsPDF/issues/2677).

Note that new issues should follow these guidelines. Otherwise, the issue will be closed without a comment and tagged with the "Needs Information" label.
Note that new issues should follow these guidelines. Otherwise, the issue will be closed without comment and tagged with the "Needs Information" label.

1. A bug should be reported as an [mcve](https://stackoverflow.com/help/mcve).
2. Make sure code is properly indented and [formatted](https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code) (Use ``` around code blocks).
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Copyright
(c) 2010-2021 James Hall, https://github.com/MrRio/jsPDF
(c) 2015-2021 yWorks GmbH, https://www.yworks.com/
(c) 2010-2025 James Hall, https://github.com/MrRio/jsPDF
(c) 2015-2025 yWorks GmbH, https://www.yworks.com/

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ yarn add jspdf
Alternatively, load it from a CDN:

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/3.0.3/jspdf.umd.min.js"></script>
```

Or always get latest version via [unpkg](https://unpkg.com/browse/jspdf/)
Expand Down Expand Up @@ -178,7 +178,7 @@ Alternatively, you can load the prebundled polyfill file. This is not recommende
loading polyfills multiple times. Might still be nifty for small applications or quick POCs.

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/polyfills.umd.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/3.0.3/polyfills.umd.js"></script>
```

## Use of Unicode Characters / UTF-8:
Expand Down Expand Up @@ -263,8 +263,8 @@ You can find information about building and testing jsPDF in the
## License (MIT)

Copyright
(c) 2010-2021 James Hall, https://github.com/MrRio/jsPDF
(c) 2015-2021 yWorks GmbH, https://www.yworks.com/
(c) 2010-2025 James Hall, https://github.com/MrRio/jsPDF
(c) 2015-2025 yWorks GmbH, https://www.yworks.com/

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
9 changes: 4 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jspdf",
"version": "2.5.1",
"homepage": "https://github.com/mrrio/jspdf",
"version": "3.0.3",
"homepage": "https://github.com/parallax/jsPDF",
"description": "PDF Document creation from JavaScript",
"main": [
"dist/jspdf.umd.js",
Expand All @@ -19,7 +19,7 @@
"optionalDependencies": {
"canvg": "^3.0.6",
"core-js": "^3.6.0",
"dompurify": "^2.0.12",
"dompurify": "^3.2.4",
"html2canvas": "^1.0.0-rc.5"
},
"devDependencies": {
Expand Down Expand Up @@ -54,7 +54,6 @@
"karma-jasmine": "3.3.1",
"karma-jasmine-matchers": "4.0.2",
"karma-mocha-reporter": "2.2.5",
"karma-sauce-launcher": "4.1.5",
"karma-typescript": "^5.0.3",
"karma-verbose-reporter": "0.0.6",
"local-web-server": "2.6.1",
Expand All @@ -68,7 +67,7 @@
"rollup-plugin-license": "^2.1.0",
"rollup-plugin-node-resolve": "4.2.3",
"rollup-plugin-preprocess": "0.0.4",
"rollup-plugin-terser": "^6.1.0",
"@rollup/plugin-terser": "^0.4.4",
"typescript": "^3.9.6"
},
"license": "MIT",
Expand Down
Loading