php - Image on PDF not showing properly -


i am, once again, having problems php.

i working on pdf have show image appears in webpage.

the problem image doesn't show on pdf.

in fact different kind of image, more chart.

everything in webpage shown in chart , have print in pdf, pdf ignores print command.

example of code in html(which works fine):

<html> <h3> can take files copies in xls or pdf format </h3> <br> <a href="../useful/excel.php"> generate excel file</a> <br> <br> <form method="post" action=""  target="_blank"> <input type="submit" name="pdf"  value="generate pdf " /> <input type="hidden" id="hide" name="hide"> </form><br> <center><div id="image" name="image"><img src="../useful/createchart.php"/></div>            </center> </html> 

as can see used php file create chart(which not class, php file methods).

so kind of clueless on have t image displayed in pdf.

btw i'm working mpdf.

and here have part of hte code print pdf, thats part matters. prints tables fine doesn't print image.

<?php // create pdf report ...  if (isset($_post['pdf'])){  $mpdf = new mpdf(); //foreach ($showmore $items){ $array = explode('-', $store);  //$result = array(); foreach ($array $member){     if($member != '')  $res= $dao->getinfobynumber ('jc', $member);  //var_dump($res);   foreach ($res $jcvalue){   $mpdf->setheader("tabela");  $mpdf->setfooter(date('l js \of f y h:i:s a'));      $htmlpdf2 .= "          <table  border='1'>          <tr>             <th width='150'>ge</th>             <td width='200'>". $jcvalue->getsg()."</td>             <td width='200'><strong>nome curto</strong></td>             <td width='200'>". $jcvalue->getnomecurto()."</td>         </tr>     </table>      <table border='1'>         <tr>             <th width='150'>valor</th>             <td width='200'>". $jcvalue->getpvalor() ."</td>             <td width='200'><strong>fc</strong></td>             <td width='200'>". $jcvalue->getfc() ."</td>         </tr>     </table>          <table border='1'>         <tr>             <th width='150'> jugular </th>             <td width='117'>". $jcvalue->getjugular1() ."</td>             <td width='117'>". $jcvalue->getjugular2() ."</td>             <td width='117'>". $jcvalue->getjugular3() ."</td>             <td width='118'>". $jcvalue->getjugular4() ."</td>             <td width='119'>". $jcvalue->getjugular5() ."</td>          </tr>     </table>      <table border='1'>         <tr>             <th width='150'>exp3d</th>             <td width='200'>". $jcvalue->getd3_1() ."</td>             <td width='200'>". $jcvalue->getd3_2() ."</td>             <td width='200'>". $jcvalue->getd3_3() ."</td>         </tr>         </table>          <table border='1'>          <tr>             <th width='150'>exp28d</th>             <td width='200'>". $jcvalue->getd28_1() ."</td>             <td width='200'>". $jcvalue->getd28_2() ."</td>             <td width='200'>". $jcvalue->getd28_3() ."</td>         </tr>     </table>      <table border='1'>          <tr>             <th width='150'>carotida</th>             <td width='303'>". $jcvalue->getcarotida_1() ."</td>             <td width='303'>". $jcvalue->getcarotida_2() ."</td>         </tr>       </table>          <br><br>";    }       }      $pdfimage = "<center><div id='image' name='image'><img   src='../useful/createchart.php'/></div></center>";    $mpdf->writehtml($htmlpdf2);     $mpdf->writehtml($pdfimage);      $mpdf->output();     } 

here code use web page select want see , apge chows data has avaiable selected + chart based on data:

  <?php session_start();   //this file contains full information sample    // include in file simple table contains informations    // calling function creat table , call function create       chart , export excel    require_once '../useful/createtable.php';   require_once '../dao/bancojc_424_dao.php';   require_once '../model/jcdrow.php';   require_once '../model/jc.php';   include("../useful/mpdf57/mpdf57/mpdf.php");   require_once '../dao/meta.php';   ?>   <?php   $table = new createtable();   $dao = new daobancojc();   $meta = new metachart();   $meta->resetmeta();   $showmore =explode('-', $_get['data']);   $showtable =explode('-', $_get['table']);   $t='';   $htmlpdf='';   foreach($showmore $item ){       if ($item !=''){    foreach($showtable $tables)         if($tables == 'jc')        {        $result=$dao->getinfobynumber ('jc', $item);     $t='jc';        }elseif ($tables == 'j3d'){    $result=$dao->getinfobynumber ('j3d', $item);    $t='j3d';       }elseif($tables == 'j28d'){       $result=$dao->getinfobynumber ('j28d', $item);      $t='j28d';       }         $store .= '';         foreach ($result $return){        $meta->insertmeta($t,$return->getsg());        $htmlpdf= 'no:'.$return->getsg(). '<br>';        $htmlpdf.= 'nome curto: '.$return->getnomecurto().' nome longo :  ';        $htmlpdf.= $return->getnomelongo();        echo $htmlpdf;             ?>        <table class="tabela_registros1" border=1 width=80% ><?php     $htmlpdf.= $table->morejc($return);             echo $htmlpdf;             ?>       </table>  <?php    $store .= '-'.$return->getsg() ;   } 


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -