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/watermarkUsage
import { Component } from "@angular/core";
import { PdfHeading } from "@/components/pdf/heading/heading";
import { PdfText } from "@/components/pdf/text/text";
import { PdfcnThemeProvider } from "@/components/pdf/theme-provider";
import { PdfWatermark } from "@/components/pdf/watermark/watermark";
import {
TakumiDocument,
TakumiPage,
TakumiView,
} from "@/lib/pdf-primitives";
@Component({
imports: [
TakumiDocument,
TakumiPage,
TakumiView,
PdfcnThemeProvider,
PdfHeading,
PdfText,
PdfWatermark,
],
template: `
<takumi-document>
<takumi-page size="A4">
<pdf-theme-provider>
<takumi-view [style]="{ minHeight: 680, position: 'relative' }">
<pdf-watermark text="DRAFT" />
<pdf-heading [level]="1">Draft Document</pdf-heading>
<pdf-text
>This report is under review and should not be distributed
externally.</pdf-text
>
<pdf-text
>The watermark sits behind the content while remaining clearly
visible.</pdf-text
>
<pdf-text
>Use watermarks for draft, confidential, sample, or approval
states.</pdf-text
>
</takumi-view>
</pdf-theme-provider>
</takumi-page>
</takumi-document>
`,
})
export class WatermarkDemo {}API Reference
PdfWatermark
| Input | Type | Default |
|---|---|---|
text |
string |
- |
opacity |
number |
- |
fontSize |
number |
- |
color |
string |
- |
angle |
number |
- |
position |
'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' |
- |
fixed |
boolean |
true |