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
- Chart.js Fill color at null line and null points Tooltip
- Add percentage to label badge - doughnut chart.js
- Chartjs change the specific label color in x axis in callback function
- Hover over chart shows multiple datapoints
- Wrong label value is displayed on point hover - Chart.JS
- Chartjs Line Color Between Two Points
- Horizontal line content is overlapping with axes : Chart.js
- Combine two line charts into one in ChartJS
- Example: Doughnut | Error: Uncaught ReferenceError: Utils is not defined
- Chart.js xAxis linear scale : strange behavior
- html2canvas Capture a chart.js-Chart with the size of full screen on different window size
- System.ArgumentException: Column 'COLUMN_NAME' does not belong to table
- react-chart2: Cannot read properties of undefined (reading 'map')
- How to place extra text on canvas (not using HTML) beside chart?
- Comparison between d3.js and chart.js (only for charts)
- $scope variable not updating when factory object changes AngularJS
- Chartjs render only the last in loop (ionic)
- Error trying to switch between different charts
- Angular Chart.js, how to remove series?
- How to offset the legends of the bars in a "chart.js" bar chart?
- ChartJS BoxWidth not working
- ChartJs with try catch
- Dropdown component not having effect in Chromium browser
- Tooltip vertically off with overlapping data, in ChartJS
- Chart.js label on bar
- How to remove the line/rule of an axis in Chart.js?
- how to put a y-axis and x-axis label while using html and chartjs
- chart.js stacked graph that overlaps
- Chartjs error : time scale: "time.format" is deprecated. Please use "time.parser" instead
- How to get dataset from MySQL using Flask?