create dynamic image with php - javascript

I need to create image chart dynamically as shown bellow,
First I tried with php ImageCreate but it is hard to manage the space with that.
Then I tried the html5 canvas and that is also having a same issue. What I need to know is whether there is an easy way to do html to image conversion. Then I can manage the space easy with other styles.
Thanks in advance.

With wkhtmltoimage you can convert HTML to an images. You would need a VPS to run it on though. You can then create the HTML and call wkhtml2image via PHP to convert the given HTML to an image.

I am creating dynamic image with php with `GDLibrary. Here is the script of creating dynamic image.

Related

Convert a long HTML page to PDF persisting CSS

I have tried JSPDF and HTML2Canvas for this. While the HTML is rendered successfully, its CSS is entirely messed up. I also read somewhere that html2canvas doesn't work with long pages.
Can anyone provide me a simple Javascript code that takes DOM element and generates its PDF and also maintains its CSS? I would really appreciate it. Thanks.

Exporting image into excel in javascript

I want to export my html page into excell sheet which contains some svg charts and html tables. I searched a lot and couldn't find any solution in javascript. I could find a php solution in this. Only thing i found is a node module(here) which i think cannot be used in a web page js file.
Finally got a solution for inserting image into excel in Excelbuilder.js.
We can insert image by specifying cell or offset positions using this plugin. It works.

Using Javascript with MPDF

I want to use the charts created in charts.js with MPDF but it doesn't seem to be recognising the Javascript elements, do you know if there is anything additional you need to add.
If MPDF cannot render Javascript do you know any other HTML to PDF converter in PHP that will work?
Better make charts in PHP using https://phpchart.com/. if you want to show it in a pdf. javascript looks and style does not work in PDF anyway.

Showing an entire ASP website as an image

I have an ASP website that gets data from SQL queries and puts them into divs and then, superimposes the divs over an image. The only problem is that when people try to save the image, they do not get the data or the divs with the image.
Is there anyway I can combine the divs and the image into one single picture using ASP or even ASP.NET? This way when people try to save the images, they get the original image and also the data that is put on top of the image as well.
I have been trying to use the
Response.ContentType = "image/gif"
tag in a separate page and tried to call that page as an image but that's not working when you have HTML combined with the ASP. Can anyone please help.
Youc can use html2canvas library to take "screenshots" of entire pages.
Update:
Apparently it is possibe server-side as well (using ASP.NET tho) by using WebBrowswer control (yes it can be used in ASP.NET as well). Take a look

Load file into QwebView

I need to create function to create advertisement here: http://www.motosale.com.ua/?add=zap
In this adv. should be image.
I have decided to create QWebView and insert each field by javascript. But i can't insert file.
How can i do that?
self.webView.page().mainFrame().evaluateJavaScript("document.getElementsByName('model_zap')[0].value='57'")
I did inserting values to inputs in that way
Maybe to try with QGraphicsWebView() instead of QwebView() ?

Categories