Sofia
1321
17
General

Generating PDFs from Laravel Views

Posted 1 year ago by Sofia

Hi,

I've been playing around with Snappy to generate PDFs from a Laravel View. The PDF is an invoice and ideally I'd like to store it and then automatically email a copy to a client.

It seems like an image of my view is being generated and I can't copy/paste text from the PDF. The files can become large if my invoices are several pages - not ideal for storage or email.

Neither of these problems occur when I print the page to a PDF using the browser (I can't remember if I have some sort of plug-in installed), so I know it's possible to generate a different type of PDF.

Any suggestions? Is there some Snappy configuration that I'm missing? Do you guys have other package suggestions?

Thanks!

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.