Livewire needs pdf as a string not base64 #120
colinmackinlay
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have been using browsershot in livewire with
streamDownload
:and the browsershot() function in my PrintsToPdf trait looks like this:
streamDownload() needs to receive a string not an already base64 encoded one.
I want to switch to laravel-pdf ao that I can test the contents of the file. That means my browsershot function now needs to be this:
There is an unnecessary overhead of laravel-pdf returning a base64 encoded string that I have to decode!
Unfortunately the
getBrowsershot() methodin
PdfBuilder` is protected. If it was public I could just call it direct.Is there another way to get an unencoded string output for Livewire. Alternatively, could the
getBrowsershot()
method be made public or could there be a getter for it e.g.toString()
?Beta Was this translation helpful? Give feedback.
All reactions