generatePdfReport()
SIP Protocol API Reference v0.7.0
SIP Protocol API Reference / generatePdfReport
Function: generatePdfReport()
Section titled “Function: generatePdfReport()”generatePdfReport(
report,options?):Uint8Array
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:7081
Generate a PDF document from an audit report
Creates a professionally formatted PDF report with:
- Header with report metadata
- Summary statistics
- Optional transaction details table
- Footer with generation timestamp
This implementation uses PDF 1.4 format and works in both Node.js and browsers.
Parameters
Section titled “Parameters”report
Section titled “report”The audit report to export
options?
Section titled “options?”PDF export options
Returns
Section titled “Returns”Uint8Array
PDF document as Uint8Array
Example
Section titled “Example”const report = await reporter.generateAuditReport({...})const pdfBytes = generatePdfReport(report, { title: 'Q1 2025 Audit Report', organization: 'ACME Corp',})
// Save to file (Node.js)fs.writeFileSync('audit-report.pdf', pdfBytes)
// Download in browserconst blob = new Blob([pdfBytes], { type: 'application/pdf' })const url = URL.createObjectURL(blob)const a = document.createElement('a')a.href = urla.download = 'audit-report.pdf'a.click()