admin
login
back
pdf generator
write a page using sail syntax, then save the file locally as a pdf.
paste this code into a hawk file
mime: /text/hawk-500
=+ ;= :: write pdf here with udon # Invoice - July 2025 ### Payer ACME Co ### Payee Joe Blow 123 Main Stree,\ Kansas City, MO 55555, USA ### Payment `4444` USDC to\ `0xYOURCRYPTOADDRESSORWHATEVER` == :: :: :: :: :: :: :: :: :: :: :: :: :: =/ body - ;div.page.prose ;div.br2.b1.p-3 ;div#main.prose:(*body) == ;button.p2.bd1.b2.br1.hover.mt2 =onclick "printEl()" ; Save as PDF == ;script ;- %- trip ''' function printEl() { const main = document.getElementById('main'); const title = document.querySelector('#main h1')?.textContent || 'Invoice'; const printWindow = window.open('', '', 'height=500, width=500'); printWindow.document.write(` <html> <head> <title>${title}</title> ${document.head.innerHTML} </head> <body>${main.outerHTML}</body> </html> `); printWindow.document.close(); printWindow.focus(); if (printWindow.document.readyState === 'complete') { printWindow.print(); printWindow.close(); } else { printWindow.onload = () => { printWindow.print() printWindow.close(); } } } ''' == ==