@papack/pdf 1.0.1 → 1.0.2
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/package.json +1 -1
- package/readme.md +3 -4
package/package.json
CHANGED
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>
|