Components
Blocks
- Gift Certificate
- Event Agenda
- Event Ticket
- Invoice Classic
- Invoice Consultant
- Invoice Corporate
- Invoice Creative
- Invoice Minimal
- Invoice Modern
- Lesson Plan
- Medical Intake Form
- Meeting Minutes
- Packing Slip
- Press Release
- Report Financial
- Report Marketing
- Report Operations
- Report Security
- Shipping Label
- Work Order
Rendering PDF…
Installation
$ pnpm dlx shadcn@latest add @angular-pdfcn/takumi/page-numberUsage
import { Component } from "@angular/core";
import { PdfHeading } from "@/components/pdf/heading/heading";
import { PdfPageNumber } from "@/components/pdf/page-number/page-number";
import { PdfText } from "@/components/pdf/text/text";
import { PdfcnThemeProvider } from "@/components/pdf/theme-provider";
import {
TakumiDocument,
TakumiPage,
TakumiView,
} from "@/lib/pdf-primitives";
@Component({
imports: [
TakumiDocument,
TakumiPage,
TakumiView,
PdfcnThemeProvider,
PdfHeading,
PdfPageNumber,
PdfText,
],
template: `
<takumi-document>
<takumi-page size="A4">
<pdf-theme-provider>
<takumi-view [style]="{ minHeight: 680, position: 'relative' }">
<takumi-view [style]="{ marginBottom: 60 }">
<pdf-heading [level]="1">Multi-Page Report</pdf-heading>
<pdf-text
>Page numbers make long reports easier to review, reference, and
print.</pdf-text
>
<pdf-text
>The format token displays the current page together with the
total page count.</pdf-text
>
</takumi-view>
<takumi-view
[style]="{ bottom: 0, left: 0, position: 'absolute', right: 0 }"
>
<pdf-page-number format="Page 1 of 1" align="center" />
</takumi-view>
</takumi-view>
</pdf-theme-provider>
</takumi-page>
</takumi-document>
`,
})
export class PageNumberDemo {}API Reference
PdfPageNumber
| Input | Type | Default |
|---|---|---|
format |
string |
'Page {page} of {total}' |
align |
'left' | 'center' | 'right' |
'center' |
size |
'xs' | 'sm' | 'md' |
'sm' |
fixed |
boolean |
false |
muted |
boolean |
true |