php - HTML on image not printing in pdf -


this code

<?php class diagram { function outlet() {     $boothsizer = 3;      if($boothsizer ==  3){         $cellwidth = '112px';         $cellheight = '52px';         $innerdivelectrictop = '41px';          $innerdivelectricleft = '110px';             $backgroundimage = 'url(booth_top_images/5x20top.jpg)';         $width = '900px';         $height = '225px';         $sidewalls = 2;         $backwalls = 6;      }     else     if($boothsizer ==  19)     {         $cellwidth = '144px';         $cellheight = '145px';         $innerdivelectrictop = '105px';          $innerdivelectricleft =  '73px';             $backgroundimage = 'url(booth_top_images/10x10top.jpg)';         $width = '599px';         $height = '605px';         $sidewalls = 3;         $backwalls = 3;     }      $innerdivelectricwidth = $backwalls * $cellwidth;     $innerdivelectricheight = $sidewalls * $cellheight;      $output = '<div style="width:'.$width.'; height:'.$height.'; background-image:'.$backgroundimage.'">';      $output .= '<div id="inner_div_electric" style="position: relative; top: '.$innerdivelectrictop.'; left: '.$innerdivelectricleft.';width:'.$innerdivelectricwidth.';height:'.$innerdivelectricheight.'">';      for($i=1; $i<=$sidewalls; $i++)     {             for($j=1; $j<=$backwalls; $j++)             {                 $output .= '<span class="droppable_class" style="width:'.($cellwidth-2).'; height:'.($cellheight-2).'; border:1px solid red; float:left;display:inline-block;margin:0px;padding:0px;"></span>';              }     }      $output .= '</div></div>';      echo $output;       include("test/mpdf/mpdf.php");     $mpdf=new mpdf();        $mpdf->ignore_invalid_utf8 = true;     $stylesheet = file_get_contents('appstyle_pdf.css');     $mpdf->writehtml($stylesheet,1);     $mpdf->writehtml($output);      $comname = "vam";      $name = "test/generated_pdfs/".str_replace(" ","-",$comname).".pdf";           $mpdf->output($name,"f");      } }  $diag = new diagram; print $diag->outlet(); ?> 

in code trying generate squares upon images , trying generate pdf, when echoed $output can see squares on images, in generated pdf image printing, squares not?

anybody ideas???

change <span> tags <div> tags , should work.

unfortunately don't have explaination solution @ moment. according mpdf script <span> tags part of enabledtags collection - mpdf.php line 23249. i'm not totally sure why <div> works , <span> doesn't.


Comments

Popular posts from this blog

asp.net mvc 3 - Using mvc3, I need to add a username/password to the sql connection string at runtime -

kineticjs - draw multiple lines and delete individual line -

thumbnails - jQuery image rotate on hover -