Skip to content

Commit 07990a7

Browse files
committed
Update changelog and readme
1 parent a21193e commit 07990a7

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## v0.4.0 - 2026-04-12
4+
5+
- **[BREAKING]** Updated to Svelte 5
6+
- The global build was replaced with a `/standalone` export, which is now also the preferred way to integrate into other frameworks
7+
- The server-side rendering API was adapted following Svelte's changes
8+
- See the `/examples` folder for updated examples
9+
310
## v0.3.3 - 2026-03-17
411

512
- Added support for style `extends`

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ npm install pdfmake-html-renderer
5353
2. Add the CSS file:
5454

5555
```js
56-
import 'pdfmake-html-renderer/dist/index.css'
56+
import 'pdfmake-html-renderer/index.css'
5757
```
5858

5959
> **NOTE**: For this to work, make sure your tooling/bundler supports importing CSS files. Otherwise, you can always use a `<link rel="stylesheet">` in your HTML file.
@@ -88,8 +88,8 @@ import PdfmakeHtmlRenderer from 'pdfmake-html-renderer'
8888
This library was built using the [Svelte](https://svelte.dev/) framework, which should allow integrating it into pretty much any web application:
8989

9090
- To consume it from a [Svelte](https://svelte.dev/) application, you may have to add build tooling to support TypeScript into your pipeline, as Svelte needs to compile the components from source
91-
- For a [React](https://reactjs.org/) or [Vue.js](https://vuejs.org/) application, you can use an adapter like [`svelte-adapter`](https://github.com/pngwn/svelte-adapter)
92-
- For other frameworks or VanillaJS, have a look at the [Svelte Component API](https://svelte.dev/docs/client-side-component-api)
91+
- Note: This version was built using Svelte 5. For Svelte 4 support, use version 0.3 of this library
92+
- For other frameworks or VanillaJS, have a look at the [Svelte Component API](https://svelte.dev/docs/svelte/imperative-component-api). Due to problems with using an external import of the `svelte` package after the Svelte 5 update, the `/standalone` build already includes the `mount`/`unmount` functions
9393

9494
Check out the `/examples` folder for some example projects.
9595

@@ -108,14 +108,13 @@ npm install -D svelte @types/pdfmake
108108
This library also provides an **experimental** server build that renders static HTML and CSS:
109109

110110
```js
111-
const { PdfmakeHtmlRenderer } = require('pdfmake-html-renderer/server')
111+
const { render, PdfmakeHtmlRenderer } = require('pdfmake-html-renderer/server')
112112

113-
const { html, css } = PdfmakeHtmlRenderer.render({
114-
document: { content: ['Hello, world!'] },
113+
const { body, head } = render(PdfmakeHtmlRenderer, {
114+
props: {
115+
document: { content: ['Hello, world!'] },
116+
},
115117
})
116-
117-
// html contains the HTML code
118-
// css.code contains the CSS code
119118
```
120119

121120
Check out `/examples/nodejs` for an exmaple.

0 commit comments

Comments
 (0)