php - "visibility:hidden;" is not working with TCPDF -


i try html pdf tcpdf

but wrong

the css visibility property not working me

this php code:

<?php 

include main tcpdf library (search installation path).

require_once('tcpdf_include.php'); 

create new pdf document

$pdf = new tcpdf(pdf_page_orientation, pdf_unit, pdf_page_format, true, 'utf-8', false); 

set document information

$pdf->setcreator(pdf_creator); $pdf->setauthor('nicola asuni'); $pdf->settitle('tcpdf example 061'); $pdf->setsubject('tcpdf tutorial'); $pdf->setkeywords('tcpdf, pdf, example, test, guide'); 

set default header data

$pdf->setheaderdata(pdf_header_logo, pdf_header_logo_width, pdf_header_title.' 061', pdf_header_string); // set header , footer fonts $pdf->setheaderfont(array(pdf_font_name_main, '', pdf_font_size_main)); $pdf->setfooterfont(array(pdf_font_name_data, '', pdf_font_size_data)); // set default monospaced font $pdf->setdefaultmonospacedfont(pdf_font_monospaced); // set margins $pdf->setmargins(pdf_margin_left, pdf_margin_top, pdf_margin_right); $pdf->setheadermargin(pdf_margin_header); $pdf->setfootermargin(pdf_margin_footer); // set auto page breaks $pdf->setautopagebreak(true, pdf_margin_bottom); // set image scale factor $pdf->setimagescale(pdf_image_scale_ratio); // set language-dependent strings (optional) if (@file_exists(dirname(__file__).'/lang/eng.php')) {     require_once(dirname(__file__).'/lang/eng.php');     $pdf->setlanguagearray($l); } // set font $pdf->setfont('helvetica', '', 10);  // add page $pdf->addpage(); $html = <<<eof  //html code  eof;  // output html content $pdf->writehtml($html, true, false, true, false, '');  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  // reset pointer last page $pdf->lastpage();  // ---------------------------------------------------------  //close , output pdf document $pdf->output('example_061.pdf', 'i'); 

this html code

 <!-- example of css style -->       <!doctype html>       <style>         table{             border:1px solid #c0c0c0;             border-collapse:collapse;          }         tr{          }         td {             border:1px solid #c0c0c0;           }      </style>       <table  id="ba1">     <tr style=" visibility:hidden;"  >     <td height= "1" ></td>     <td height= "1"  class="ui-resizable" style="width: 39px;"></td>     <td height= "1"  class="ui-resizable" style="width: 76px;"></td>             <td height= "1"  class="ui-resizable" style="width: 33px;"></td>     <td height= "1"  class="ui-resizable" style="width: 132px;"></td>     <td height= "1"  class="ui-resizable" style="width: 345px;"></td>     </tr>        <tr><td class="ui-resizable" style="height: 10px; visibility: hidden;"> </td>            <td class="" style=" font-size: 10px;">編號</td>     <td></td>     <td class="" style="font-size: 10px;">姓名</td>     <td></td><td class="" style=" font-size: 10px;">公布欄</td></tr>     <tr><td class="ui-resizable" style="height: 10px; visibility: hidden;"></td>     <td colspan="3" rowspan="1" class="" style=" font-size: 10px;">繳費項目</td>    <td class="" style="font-size: 10px;">金額</td><td colspan="1" rowspan="2"></td></tr>          <tr><td class="ui-resizable" style="height: 134px; visibility: hidden;"></td>            <td colspan="4" rowspan="2"></td></tr>       <tr><td class="ui-resizable" style="height: 92px; visibility: hidden;"></td>     <td colspan="1" rowspan="2"></td></tr>     <tr><td class="ui-resizable" style="height: 17px; visibility: hidden;"></td>     <td colspan="4" rowspan="1" class="" style=" font-size: 10px;">合計:</td></tr></table> 

if not support property

there no other way recommended?

tcpdf extension has little css support.

currently, following css attributes supported:

  • font-family
  • font-size
  • font-weight
  • font-style
  • color
  • background-color
  • text-decoration
  • width
  • height
  • text-align

other tags not work.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -