Components
Blocks
- Event Agenda
- Event Ticket
- Gift Certificate
- 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/forme/formUsage
import { Component } from "@angular/core";
import { PdfForm } from "@/components/pdf/form/form";
import type { PdfFormGroup } from "@/components/pdf/form/form.types";
import {
FormeDocument,
FormePage,
} from "@/lib/pdf-primitives";
@Component({
imports: [FormeDocument, FormePage, PdfForm],
template: `
<forme-document>
<forme-page size="A4" [margin]="40">
<pdf-form
title="Job Application"
subtitle="Please complete all fields clearly in block capitals."
variant="underline"
[groups]="groups"
/>
</forme-page>
</forme-document>
`,
})
export class FormDemo {
protected readonly groups: PdfFormGroup[] = [
{
fields: [
{ hint: "First and last name", label: "Full Name" },
{ hint: "DD / MM / YYYY", label: "Date of Birth" },
{ label: "Email Address" },
{ hint: "+1 (555) 000-0000", label: "Phone Number" },
],
title: "Personal Information",
},
{
fields: [
{ label: "Street Address", width: "100%" },
{ label: "City" },
{ label: "State / Province" },
{ label: "Postal Code" },
],
layout: "two-column",
title: "Address",
},
{
fields: [{ height: 60, label: "Cover Letter" }],
title: "Additional Information",
},
];
}Variants
<pdf-form
variant="outlined"
labelPosition="left"
[groups]="[{ title: 'Contact', layout: 'two-column', fields }]"
/>API Reference
PdfForm
| Input | Type | Default |
|---|---|---|
title |
string |
- |
subtitle |
string |
- |
groups |
PdfFormGroup[] |
- |
variant |
'underline' | 'box' | 'outlined' | 'ghost' |
'underline' |
labelPosition |
'above' | 'left' |
'above' |
noWrap |
boolean |
false |
style |
Style |
- |
Groups support single, two-column, and three-column layouts.