Panos
Panos

Reputation: 61

PDF Generation with Snappy- Laravel

So, snappy does an amazing job for creating PDFs for my Laravel site. The problem is the login. Snappy can PDF all the pages before the login but if I try to pdf the url of a page that appears only after login, then it PDFs the login page. It must be something to do with sessions or the Auth function. Anyone knows how to PDF pages that require authorisation with Snappy?

Upvotes: 3

Views: 2390

Answers (1)

CalixCaine
CalixCaine

Reputation: 33

Am not aware much about passing authentication to the pdf generation. But what i suggest is, have a separate page which will render all your required data and generate pdf.

Example : Say you want to generate pdf with user profile detail.

First you need to have a normal page which will ask for authentication, once authentication done and details are fetched, then the retrieved information send to the pdf generation page which render the data.

Upvotes: 1

Related Questions