You can generate PDFs using an external library like jsPDF.
Here’s a more comprehensive example that builds an invoice.