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

QR Code

QR code generated from a string value.

Takumi Forme
Rendering PDF…

Installation

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

Usage

import { Component } from "@angular/core";

import { PdfHeading } from "@/components/pdf/heading/heading";
import { PdfQRCode } from "@/components/pdf/qrcode/qrcode";
import { PdfSection } from "@/components/pdf/section/section";
import { PdfStack } from "@/components/pdf/stack/stack";
import { PdfText } from "@/components/pdf/text/text";
import { PdfcnThemeProvider } from "@/components/pdf/theme-provider";
import {
  TakumiDocument,
  TakumiPage,
} from "@/lib/pdf-primitives";

@Component({
  imports: [
    TakumiDocument,
    TakumiPage,
    PdfcnThemeProvider,
    PdfHeading,
    PdfQRCode,
    PdfSection,
    PdfStack,
    PdfText,
  ],
  template: `
    <takumi-document>
      <takumi-page size="A4">
        <pdf-theme-provider>
          <pdf-section spacing="none">
            <pdf-heading [level]="1">Invoice #12345</pdf-heading>
            <pdf-text>Amount Due: $500.00</pdf-text>
            <pdf-section>
              <pdf-stack direction="horizontal" gap="lg" align="start">
                <pdf-qrcode
                  value="https://pdfcn.dev/pay/invoice-12345"
                  [size]="100"
                  caption="Scan to pay"
                />
                <pdf-qrcode
                  value="https://pdfcn.dev/verify/invoice-12345"
                  [size]="80"
                  caption="Verify document"
                />
              </pdf-stack>
            </pdf-section>
            <pdf-text variant="sm" color="mutedForeground"
              >QR codes are rendered as crisp vector graphics in the generated
              PDF.</pdf-text
            >
          </pdf-section>
        </pdf-theme-provider>
      </takumi-page>
    </takumi-document>
  `,
})
export class QRCodeDemo {}

API Reference

PdfQRCode

Input Type Default
value string -
size number -
color string -
backgroundColor string -
errorLevel 'L' | 'M' | 'Q' | 'H' -
margin number -
caption string -