Skip to content

Example: Invoice / PDF template #20

@ericdellacasa8

Description

@ericdellacasa8

Context

Elements supports <Document> for print/PDF mode, but we do not currently have a real invoice or receipt example showing this pillar clearly.

For a launch story built around one component tree to email, web, and PDF, we need a concrete PDF-oriented example.

Definition of Done

  • Add an invoice or receipt template built with <Document>
  • Include line items using <Table>
  • Include subtotal, tax, total, and payment/status details
  • Demonstrate producing print-ready HTML with renderToHtml(tree)
  • Add a short note or snippet showing how this HTML can be converted to PDF with Puppeteer or Playwright
  • Add the example either as a demo template under a new document category or under examples/invoice-pdf/

Where to start

  • packages/react/src/components/Document.tsx
  • Table component
  • render-to-json.test.tsx
  • wrappers.test.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions