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/qrcodeUsage
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 |
- |