ERREUR HTML2PDF convert highchart to pdf

747 views Asked by At

My idea is to create a button in this page and when i click in this button convert my html ( highchart ) to pdf

this is my erreur :

ERREUR n°1 : La balise n'existe pas encore.Si vous voulez la rajouter, vous devez créer les méthodes o_SCRIPT (pour l'ouverture) et c_SCRIPT (pour la fermeture) en suivant le modèle des balises existantes.De plus, si vous créez ces méthodes, n'hésitez pas à en faire profiter tout le monde en m'écrivant sur [email protected] afin qu'elles se retrouvent dans la prochaine version d'HTML2PDF.

tag does not yet exist. If you want to add it, you must create the methods o_SCRIPT (for opening) and c_SCRIPT (for closure) by following the model of existing tags. If you create these methods, do not hesitate to send me an email to [email protected] to included them in the next version of HTML2PDF.

<?php

  ob_start(); 
  ?>
 <page>
 <script type="text/javascript">
    $(function () {
$('#container').highcharts({

        <?php
        $chaine="y: 30.5,  marker: {symbol: 'url(".URL::to_asset('icon/graph/clear.png').")'}";

        ?>
    chart: {
        type: 'spline'
    },
    title: {
        text: 'Monthly Average Temperature'
    },
    subtitle: {
        text: 'Source: WorldClimate.com'
    },
    xAxis: {
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
    },
    yAxis: {
        title: {
            text: 'Temperature'
        },
        labels: {
            formatter: function () {
                return this.value + '°';
            }
        }
    },
    tooltip: {
        crosshairs: true,
        shared: true
    },
    plotOptions: {
        spline: {
            marker: {
                radius: 4,
                lineColor: '#666666',
                lineWidth: 1
            }
        }
    },
    series: [{
        name: 'Tokyo',
        marker: {

                     radius: 0
        },
        data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, {<?php echo $chaine ?>

        }, 23.3, 18.3, 13.9, 9.6],


    }, {
        name: 'London',
        marker: {
            symbol: 'diamond'
        },
        data: [{
            y: 3.9,
            marker: {
                symbol: 'url(http://www.highcharts.com/demo/gfx/snow.png)'
            }
          }, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
    }]
    });
     });
 </script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto">   </div>
   </page>



   <?php
     $content = ob_get_clean();
     require ('public/html2pdf_v4.03/html2pdf.class.php'); 
     $html2pdf = new HTML2PDF('P', 'A4', 'fr');
     $html2pdf->writeHTML($content);
     $html2pdf->Output('img_jpgraph/test.pdf');
    ?>
0

There are 0 answers