You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not able to convert html file stored in my local to image. When I use addPage it converts image to pdf with .png extension $conv->adapter($client, env('AWS_BUCKET')) ->addPage($view) ->setImageOptions($options) ->toPng() ->save('try.png'); return response()->json("done");
Using a url I am able to store image to my s3 bucket but not with local html file.
Need help asap.
The text was updated successfully, but these errors were encountered:
source() method only works with the path to the file, we can't just pass the $view.
So what I did was, I create a file in public folder (e.g. generated.html) and pass $html to the generated.html using laravel File::put(). Then create $path and assign the path to the generated.html, and pass $path to the source() method.
P.S. Since it's not safe to have something on public folder, after the save() method, I just pass empty string to the $html.
I am not able to convert html file stored in my local to image. When I use addPage it converts image to pdf with .png extension
$conv->adapter($client, env('AWS_BUCKET')) ->addPage($view) ->setImageOptions($options) ->toPng() ->save('try.png'); return response()->json("done");
Using a url I am able to store image to my s3 bucket but not with local html file.
Need help asap.
The text was updated successfully, but these errors were encountered: