roo
roo

Reputation: 343

Save view as png laravel

I'm having a nightmare with this. I've currently got an application which allows a user to view information by grabbing data from an API. I want to programatically save the view the user sees as a png image.

I've tried using Snappy etc but the pdf output isn't great and I want to save the view as a png. I tried using phantomjs but the problem is that the view needs the user to be logged in and so I just get the 'you need to be logged in screen'

Does anyone have advice on how to make a method in my controller to save an authenticated user's view as a png on load?

Thanks!

Upvotes: 2

Views: 2770

Answers (1)

dparoli
dparoli

Reputation: 9171

Laravel snappy has the option to create images in different formats in addition to pdf.

It require some effort to proper configure but you can use the same css you use in the original view.

My advice is to continue to try with laravel snappy

Upvotes: 2

Related Questions