I am using Laravel 5.2 and I use wkhtmltopdf (snappy PDF) for get html to pdf.
For html to PDF it work perfect with internal image and external images with http urls.
like I use http://extradomain.com/logo.png work perfect there is no problem to load image on PDF file. but when I use https like https://exaple.com/logo.png its not working at all.
I tried with :
$pdf->setOption('isRemoteEnabled',true);
but there is error of function not found and its not working.
how can I rander images from https ?
Related
Struggling to use the html2canvas-proxy for cross origin screenshots. As far as I understand, passing the url as a parameter(localhost:xxxx?url=https://...) returns the image screenshot data as a base 64 string (check blob).
This works only if the url parameter is an image source. On using any other url and using the same as an image source, I just get the alt text.
For example the proxy works with https://placebear.com/200/300 but fails to work with https://google.com as the url parameter.
Any help would be much appreciated
The html2canvas-proxy is only intended for use in combination with the html2canvas library itself. It's a NodeJS server with CORS enabled so that html2canvas can send the cross-domain image URLs to and receive the corresponding base64 data URL for processing in the canvases.
It doesn't work as a server that takes in a website URL and returns a screenshot of that website.
My web app is running under Laravel 6.
In this app, I have a html page that is accessible through an URL but I also want to download this exact same page. The page is made with Bootstrap 4 and has charts using ChartJS lib.
When I try to download as PDF (thanks to Dompdf for Laravel) the exact same page, I get the following error message :
No block-level parent found. Not good.
added in the config/dompdf.php
"enable_html5_parser" => true,
I ended up using WKHTMLTOPDF and generating images corresponding to the charts before (browser side). Fastest solution for me :)
I am using laravel-dompdf to generate a pdf but to show images in that pdf I tried the route and controller approach but it's working for webpage but not for pdf. That's I am using the server path (/home/shashank/work/jobs/storage/app/{{$photo}}).
I want to know if it's safe or not.
Jsonp can be used to fetch data from supporting services but can i use it to upload images. As far as i understand javascript cannot access your file system making it impossible to upload an image using pure javascript techniques.However is there a work around. Can an image be uploaded to a server using jsonp?
I don't think you can just using json. The closest you can get is posting to a seperate iframe. Jquery has a feature where you can post a form to a hidden iframe.
http://aspzone.com/tech/jquery-file-upload-in-asp-net-mvc-without-using-flash/
If you are using jquery: http://plugins.jquery.com/plugin-tags/ajax-upload
I tried upload image with CKEditor form ASP.net server and send image to upload with PHP in another server.
That's work for upload image but the image didn't show on editor.
Please could you help to solve this problem.
You can't use different servers due to cross-site scripting protection by the browser. Check this sample: http://cksource.com/forums/viewtopic.php?p=46715#p46715