@papack/pdf 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -342
- package/dist/index.mjs +1 -336
- package/dist/index.mjs.map +1 -1
- package/licence.md +1 -21
- package/package.json +5 -3
- package/readme.md +3 -4
package/licence.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2025 Matthias Steiner
|
|
3
|
+
Copyright (c) 2025 - 2026 Matthias Steiner
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -19,23 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
22
|
-
|
|
23
|
-
## Third-Party Software
|
|
24
|
-
|
|
25
|
-
This software bundles and/or includes code from the following third-party
|
|
26
|
-
projects. These components are distributed under their respective licenses.
|
|
27
|
-
|
|
28
|
-
### React
|
|
29
|
-
|
|
30
|
-
Copyright (c) Meta Platforms, Inc. and affiliates
|
|
31
|
-
License: MIT
|
|
32
|
-
https://github.com/facebook/react
|
|
33
|
-
|
|
34
|
-
### @react-pdf/renderer
|
|
35
|
-
|
|
36
|
-
Copyright (c) Diego Muracciole
|
|
37
|
-
License: MIT
|
|
38
|
-
https://github.com/diegomura/react-pdf
|
|
39
|
-
|
|
40
|
-
The original license texts of these projects apply to the portions of the
|
|
41
|
-
software derived from them and are not superseded by the license above.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papack/pdf",
|
|
3
3
|
"description": "Minimal PDF rendering wrapper built on React and react-pdf",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"author": "Matthias Steiner",
|
|
6
6
|
"repository": "github:papack/pdf",
|
|
7
7
|
"homepage": "https://github.com/papack/pdf",
|
|
@@ -19,11 +19,13 @@
|
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsdown"
|
|
21
21
|
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"react": "^19",
|
|
24
|
+
"@react-pdf/renderer": "^4"
|
|
25
|
+
},
|
|
22
26
|
"devDependencies": {
|
|
23
|
-
"@react-pdf/renderer": "^4.3.1",
|
|
24
27
|
"@types/bun": "latest",
|
|
25
28
|
"@types/react": "^19.2.7",
|
|
26
|
-
"react": "^19.2.3",
|
|
27
29
|
"tsdown": "^0.18.2"
|
|
28
30
|
}
|
|
29
31
|
}
|
package/readme.md
CHANGED
|
@@ -28,9 +28,8 @@ npm install @papack/pdf
|
|
|
28
28
|
## Quick Start
|
|
29
29
|
|
|
30
30
|
```ts
|
|
31
|
-
import { jsx, render } from "@papack/pdf
|
|
31
|
+
import { jsx, render, Document, Page, Text } from "@papack/pdf";
|
|
32
32
|
import { writeFile } from "fs/promises";
|
|
33
|
-
import { Document, Page, Text } from "@papack/pdf/layout";
|
|
34
33
|
|
|
35
34
|
const MyDocument = () => (
|
|
36
35
|
<Document title="Example">
|
|
@@ -47,7 +46,7 @@ await writeFile("example.pdf", buffer);
|
|
|
47
46
|
## Rendering
|
|
48
47
|
|
|
49
48
|
```ts
|
|
50
|
-
import { render } from "@papack/pdf
|
|
49
|
+
import { render } from "@papack/pdf";
|
|
51
50
|
|
|
52
51
|
const buf = await render(<MyDocument />);
|
|
53
52
|
```
|
|
@@ -129,7 +128,7 @@ Example:
|
|
|
129
128
|
## Absolute Positioning
|
|
130
129
|
|
|
131
130
|
```tsx
|
|
132
|
-
import { Absolute } from "@papack/pdf
|
|
131
|
+
import { Absolute } from "@papack/pdf";
|
|
133
132
|
|
|
134
133
|
<Absolute top="2cm" left="2cm">
|
|
135
134
|
<Text>Overlay</Text>
|