API
Metadata & Compression
Metadata
Metadata options
| Option | Type | Description |
|---|---|---|
title | string | PDF document title. |
author | string | PDF author. |
subject | string | PDF subject. |
keywords | string[] | PDF keywords. |
creator | string | PDF creator/application value. |
import type { PdfMetadataOptions } from 'vue-pdf-export'
const metadata: PdfMetadataOptions = {
title: 'Invoice #1024',
author: 'Acme Inc.',
subject: 'Customer invoice',
keywords: ['invoice', '2026'],
creator: 'vue-pdf-export',
}
<Html2Pdf :metadata="metadata" />
Metadata is written to PDF document properties and is not rendered as normal visible page content.
The direct metadata prop takes priority over htmlToPdfOptions.metadata.
Compression
<Html2Pdf :compress="true" />
compress controls jsPDF stream compression.
It does not lower html2canvas resolution or JPEG image quality.
If omitted, compatible raw htmlToPdfOptions.jsPDF.compress is preserved.
