Skip to content

armgit / pdfcn

Public Imported from GitHub
0

Beautiful pdf components, built on Takumi and Forme. 100% Free, Zero config, one command setup.

fix: let the page margin hold the report footer

Kane Wangda0b78927670
diff --git a/examples/preview-config.tsx b/examples/preview-config.tsx
index ef7ee0b..4320cf6 100644
--- a/examples/preview-config.tsx
+++ b/examples/preview-config.tsx
@@ -72,9 +72,15 @@ export const getTakumiPreviewOptions = (name: string): RenderOptions => {
? 0
: pointToCssPixel(COMPONENT_MARGINS[name] ?? DEFAULT_MARGIN);
+ if (REPORT_NAMES.has(name)) {
+ return {
+ footer: reportFooter,
+ size: "a4",
+ };
+ }
+
return {
- footer: REPORT_NAMES.has(name) ? reportFooter : undefined,
- margin: { bottom: margin, left: margin, right: margin, top: margin },
+ margin,
size: COMPONENT_SIZES[name] ?? "a4",
};
};
diff --git a/package.json b/package.json
index f00d99a..6af7a09 100644
--- a/package.json
+++ b/package.json
@@ -45,7 +45,7 @@
"sonner": "^2.0.7",
"sucrase": "^3.35.1",
"tailwind-merge": "^3.5.0",
- "takumi-pdf": "^0.9.0",
+ "takumi-pdf": "^0.9.1",
"ts-morph": "^26.0.0",
"vaul": "^1.1.2",
"web-haptics": "^0.0.6",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9c96279..cffd6ea 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -102,8 +102,8 @@ importers:
specifier: ^3.5.0
version: 3.5.0
takumi-pdf:
- specifier: ^0.9.0
- version: 0.9.0([email protected])
+ specifier: ^0.9.1
+ version: 0.9.1([email protected])
ts-morph:
specifier: ^26.0.0
version: 26.0.0
@@ -4287,8 +4287,8 @@ packages:
resolution: {integrity: sha512-HhKppgO81FQof5m6TEnuBWCZGgfRAWbaeOaGT00KOy/Pf/j6oUihdvBpA7ltCeAvZpFhW3j0PTclkxsd4IXYDA==}
- resolution: {integrity: sha512-A/U1XNiaomRmK3NQCDZzF/3e/lBBYjMzQBr/QDRowF0Jc3epjeo7qisIxrKbpvHxojn3TqZKvsv55Cpk/cKOqQ==}
+ resolution: {integrity: sha512-HxSn+2XF6UkdJoaBELkFTAaJQI7No6S+YJEPEP+jWUXdRBeAq7VOA07u8NjP/H+pu5o1bTlzi/SNG4i7blJByg==}
engines: {node: '>=18'}
peerDependencies:
react: ^18.0.0 || ^19.0.0
@@ -8880,7 +8880,7 @@ snapshots:
dependencies:
'@takumi-rs/helpers': 2.9.0([email protected])
optionalDependencies:
diff --git a/registry/bases/takumi/blocks/report-financial/report-layout.tsx b/registry/bases/takumi/blocks/report-financial/report-layout.tsx
index 8816057..2ae55ca 100644
--- a/registry/bases/takumi/blocks/report-financial/report-layout.tsx
+++ b/registry/bases/takumi/blocks/report-financial/report-layout.tsx
@@ -148,8 +148,6 @@ export const ReportLayout = ({
page: {
backgroundColor: theme.colors.background,
boxSizing: "border-box",
- minHeight: 841,
- paddingBottom: theme.spacing.page.marginBottom,
paddingLeft: theme.spacing.page.marginLeft,
paddingRight: theme.spacing.page.marginRight,
paddingTop: theme.spacing.page.marginTop,
diff --git a/registry/bases/takumi/blocks/report-marketing/report-layout.tsx b/registry/bases/takumi/blocks/report-marketing/report-layout.tsx
index 8816057..2ae55ca 100644
--- a/registry/bases/takumi/blocks/report-marketing/report-layout.tsx
+++ b/registry/bases/takumi/blocks/report-marketing/report-layout.tsx
@@ -148,8 +148,6 @@ export const ReportLayout = ({
page: {
backgroundColor: theme.colors.background,
boxSizing: "border-box",
- minHeight: 841,
- paddingBottom: theme.spacing.page.marginBottom,
paddingLeft: theme.spacing.page.marginLeft,
paddingRight: theme.spacing.page.marginRight,
paddingTop: theme.spacing.page.marginTop,
diff --git a/registry/bases/takumi/blocks/report-operations/report-layout.tsx b/registry/bases/takumi/blocks/report-operations/report-layout.tsx
index 8816057..2ae55ca 100644
--- a/registry/bases/takumi/blocks/report-operations/report-layout.tsx
+++ b/registry/bases/takumi/blocks/report-operations/report-layout.tsx
@@ -148,8 +148,6 @@ export const ReportLayout = ({
page: {
backgroundColor: theme.colors.background,
boxSizing: "border-box",
- minHeight: 841,
- paddingBottom: theme.spacing.page.marginBottom,
paddingLeft: theme.spacing.page.marginLeft,
paddingRight: theme.spacing.page.marginRight,
paddingTop: theme.spacing.page.marginTop,
diff --git a/registry/bases/takumi/blocks/report-security/report-layout.tsx b/registry/bases/takumi/blocks/report-security/report-layout.tsx
index 8816057..2ae55ca 100644
--- a/registry/bases/takumi/blocks/report-security/report-layout.tsx
+++ b/registry/bases/takumi/blocks/report-security/report-layout.tsx
@@ -148,8 +148,6 @@ export const ReportLayout = ({
page: {
backgroundColor: theme.colors.background,
boxSizing: "border-box",
- minHeight: 841,
- paddingBottom: theme.spacing.page.marginBottom,
paddingLeft: theme.spacing.page.marginLeft,
paddingRight: theme.spacing.page.marginRight,
paddingTop: theme.spacing.page.marginTop,