score:1
i think your problem is not with html2pdf but the error is with the events sequence to create the html2pdf. what i understand doing events as:
1. loading php code
2. loading according to php and creating charts/canvas through js
3. pringing html2pdf output through php code
the real problem is that step no.3 is not waiting for completion of step no.2. thus, you have to create a trigger/event to start step no.3 on completion of step no.2. generally the html2pdf are created through js as under:
score:2
as the error message hints for: you'd have go to html2pdf on github and create a new issue there; in order to have tag canvas
added into the next one release of the library - or try to use something else than a canvas
to render the chart; other charting-libraries would also work with tag div
or svg
.
well, see issue 372 ...the author does not intent to add tag canvas
.
therefore, you could only work around, eg. with phantomjs
, to create a screenshot of the canvas and then use that as static image resource, in order to render it to pdf.
Source: stackoverflow.com
Related Query
- How to add ChartJS code in Html2Pdf to view image
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- How to modify chartjs tooltip so i can add customized strings in tooltips
- How to add label for ChartJs Legend
- How to change the color of legend in chartjs and be able to add one more legend?
- How can i add an image as background in Chartjs?
- How to add background color between two lines in yAxis Chartjs
- How to add image to chart.js tooltip?
- How to add an image to a slice of a donut chart in chart.js?
- How to add background image in bar chart column in Chart.js?
- ChartJS version 3 how to add percentage to pie chart tooltip
- How to add background color between two specific lines in Chartjs 3.1
- How to add datalabels to chartJS on Primefaces
- How to add a Date Selector to Chartjs in the context of Vue.js
- How to add new data point and remove leftmost data point dynamically in Chartjs
- How to add space to the bottom of the chart in chartjs [angular]
- chartjs 2.7 how to add labels in center of horizontal bar graph
- How to add left padding for my charts done in ChartJs and my Google Map so it is not glued to the limit of the page on the left
- How to add margin bottom in Tittle ChartJS
- How to add additional label in the middle of each bar using ChartJS
- How to add image inside the doughnut chart using chart.js?
- How do I add Date range filter in chartjs in the context of Vue.js
- ChartJS - How to add Text between Pie Chart and Legend
- How do I add an image in the middle of Donut Chart?(Chart.js)
- chartjs - how do I add border radius on bottom corners
- how to add extra label at zero levels in x-axis in chartjs
- How to modify chartjs tooltip to add customized attribute
- how to add color to each data in chartjs scatter plot
- How can I add functionality to Chartjs Doughnut chart custom legend
- Add an image as background in ChartJS chart area [Not to canvas]
More Query from same tag
- Add Time Scaling to linechart (Chart.js)
- In chart.js, Is it possible to hide x-axis label/text of bar chart if accessing from mobile?
- core.js:4197 ERROR TypeError: chart_js__WEBPACK_IMPORTED_MODULE_2__ is not a constructor
- Chart.js — drawing an arbitrary vertical line
- Chart.js with factory and webservices (Ionic)
- Chart.js - Scale of secondary Y axis
- Remove custom Chart Js tool tip colour square
- Chartjs background color multiple Dataset
- Chart.js : How to get a line created by sum of others line?
- Style X and Y Axis (tick mark) with Chart.js?
- Draw y-axis inside the graph area with chart js
- Resetting transform: rotate() by removing and appending canvas not showing data after appending and redrawing chart
- How to iterate over array elements inside objects in javascript
- How to edit style of negative x grid lines on Chart.js?
- Pagination in Bar chart using ChartJS
- How to use chart.js to plot line chart with x axis as time stamp in seconds
- Chart.js chart.update() method is not doing anything
- How to display label on side of doughnut in chart js
- Create grouped-bar using chart.js, php and mysql
- Chart.JS format date in label
- Dynamically add charts with chart.js
- charts.js chart size it's diferente than container setted size
- Angular 6 Charting Google Sheets API Data
- Chart.js: Force display of a certain label with autoSkip: true
- Change legend style from bar to line chart.js 2.4.0
- How to change the font size of yAxis ticks in chartJs?
- Tool tip not showing for those label who's data overlapped on each other in chart.js
- Multiple Range Highlighting of Background in Chart.js
- Chartjs is graphing my values at positions 0,1,2 rather than their values along the x axis
- Chart.js: Line chart with partial dashed line