{
return new Promise ((resolve, reject) => {
const doc = new PDFDocument()
doc.path('M 0,20 L 100,160 Q 130,200 150,120 C 190,-40 200,200 300,150 L 400,90')
.stroke()
doc.end()
const stream = doc.pipe(blobStream())
stream.on('finish', () => {
const url = stream.toBlobURL('application/pdf')
resolve(html`<a href="${url}" target="_blank">Generated PDF</a>`)
}).on('error', reject)
})
}