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 :)
Related
I need to render my CKEditor Data on my web page but it's not happening as I am using vuejs, which does not refresh the page it just replaces the components.
My CKEditor data also contain MathML Formulas.
Need to load it dynamically from the rest API.
Example of data that is stored as the output of CKEditor
<p><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mrow><mo>(</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>)</mo></mrow><mn>2</mn></msup><mo>=</mo><msup><mi>a</mi><mrow><mn>2</mn></mrow></msup><mo>+</mo><mn>2</mn><mi>a</mi><mi>b</mi><mo>+</mo><msup><mi>b</mi><mn>2</mn></msup></math></p>
rendering MathML can be done using the CDN
https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
but this thing works on page refresh and because VueJS is SPA it does not work there.
I want to render the formula in my , not in the CKEditor.
I have got the formula mentioned as an output of CKEditor but now want to display it on a normal webpage of vuejs
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 ?
I'm using jet-pack carousel in my gallery website and i want to add image rating capabilities. I have the "wp-postratings" plugin running on the rest of my site.
I'm assuming that i could add this to individual images as wp treats each image as a post, if so where would i find the template i should add this code to?
All the plugin requires is that i add one line of php to the page/image but i can't figure out where it shoud go as the code for carousel seems to be entirely js and php generated.
demo: http://so.devilmaycode.it/adding-rating-feature-to-jetpack-carousel/gallery/
in a js file jetPack_meet_wpPostRating.js copy this code (place the file in the js folder of your theme):
https://gist.github.com/aSeptik/9739808
in the functions.php file of your theme put this code:
https://gist.github.com/aSeptik/9739808
NOTE
after installing the above scripts make sure to delete the browser cache before test.
tested with latest wordpress, jetpack and wp-postrating versions.
this will also work with multiple gallery in the same page.
does not need to put any extra [ratings] shortcode anyware.
the bounty for this answer is too low... ;)
FIX
Fixed bugs added some check and debug to consol.log...
You can use hook into the Jetpack Carousel on the server-side
(like to output your data, for example).
Then on the client-side, get your Javascript rating code to
load after the Jetpack+Carousel JS, and hook into them
(hook on the bindings, etc).
JetPack provides 2 JavaScript hooks:
1) jp_carousel.afterOpen
2)jp_carousel.beforeClose.
Action hook code example
Use phonegap 1.6,now called cordova 1.6, with jquery mobile 1.0.1,but I feel performance is a problem.
Also with some other js libs,such as iscroll.js, plus the performance problem.
Can I load phonegap js just once,and later all pages can still use phonegap api?
I have an idea that Page A load phonegap js ,and nested iframe refer Page B.
Page B will replace by other pages. Can Pages in iframe use its parent phonegap api?
eg: parent.(all phonegap api)
You can use jQuery Mobile data-role="page" to define multiple pages on a single html page with one phonegap.js load.
See the docs at http://jquerymobile.com/demos/1.1.0/docs/pages/page-anatomy.html
I using Opencart CMS. I was apply Opencart version Mobile by using Jquery mobile.
All page working very well but Checkout page.
Jquery mobile working for the first load and no Modify. But when i choose "Modify" button and Submit it. The next page (Load via Ajax) will don't apply css and js.
I have tried using .page() , .trigger(create) methods ... and got nowhere.
Please help me!
I have the same problem with a multi-page template.
When I call $.mobile.changePage() the page loads just fine at first. On the second call the CSS is not loaded (or painted properly).