For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any docs URL. An agent skill is available at /.well-known/agent-skills/site-skill.md.
0Sponsor

Watermark

Diagonal or centered watermark overlay.

Takumi Forme
Rendering PDF…

Installation

$ pnpm dlx shadcn@latest add @angular-pdfcn/takumi/watermark

Usage

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