get_cellmap() issue with DomPDF

dompdf->set_option('ishtml5parserenabled', true)
dompdf documentation
call to a member function get_cellmap() on null in laravel
dompdf for yii2
dompdf table cell
manually install dompdf
dompdf php 7
symfony dompdf

I'm working with DomPdf and trying to convert my file into pdf but facing a strange error given below

I googled many times and read different forums but didn't get the reason for this error.

Please help me guys.

Fatal error: Uncaught Error: Call to a member function get_cellmap() on null in C:\xampp\htdocs\dom\dompdf\src\FrameReflower\TableCell.php:37 Stack trace: #0 C:\xampp\htdocs\dom\dompdf\src\FrameDecorator\AbstractFrameDecorator.php(893): Dompdf\FrameReflower\TableCell->reflow(NULL) #1 C:\xampp\htdocs\dom\dompdf\src\FrameReflower\TableRow.php(52): Dompdf\FrameDecorator\AbstractFrameDecorator->reflow() #2 C:\xampp\htdocs\dom\dompdf\src\FrameDecorator\AbstractFrameDecorator.php(893): Dompdf\FrameReflower\TableRow->reflow(NULL) #3

Code

require_once './dompdf/autoload.inc.php';
use Dompdf\Dompdf;

$dompdf = new Dompdf();
$dompdf->loadHtml(file_get_contents('./my-file.php'));

$dompdf->setPaper('A4','landscape');
$dompdf->render();

$dompdf->stream('codexworld',array('Attachment'=>0));

my-file.php

<!DOCTYPE html>
<html>

<head>
</head>

<body>

<div id="page-wrap">
<form method="post" action="save_view.php" novalidate="">   

<div id="header">

<h2 class="title" style="text-decoration: underline;font-size:2em;font-family: Brush Script Mt;">Pro Tech Diagnostics</h2>
<!--            <img id="image"  width="auto" src="images/Logo.png" alt="logo" height="60"/>-->
<div  class="adjust_contact">
<p>26893 Bouquet Canyon Rd. Suite C204 Saugus, CA 91350</p>
<div class="parent">

<p class="left">Phone # (818)644-1965</p>
<p class="right">Fax # (661) 468-7504</p>
</div>
</div>
</div>

<div id="identity">



<div id="header1">

<h3>Customer Info</h3>
</div>

</div>


<div style="clear:both"></div>


<!--            <textarea id="customer-title">Widget Corp.
c/o Steve Widget</textarea>-->

<div id="customer"> 
<div id="parent">

<table id="meta" style="overflow: wrap" class="left1">

<tr>
<td class="meta-head">Name</td>
<td>
<input name="name" type="text"/>

</td>
</tr>

<tr>
<td class="meta-head">Address</td>
<td>
<input name="address" type="text"/>

</td>
</tr>
<tr>
<td class="meta-head">Phone</td>
<td>
<input  required="required" name="phone" type="text"/>

</td>
</tr>                


</table>



<table id="meta" style="overflow: wrap" class="right1">


<tr>
<td class="meta-head">Invoice#</td>
<td>
<input  required="required" name="invoice" type="text"/>

</td>
</tr>                

<tr>

<td class="meta-head">Paid Date</td>
<td>
<input  required="required" name="date" type="text"/>
</td>
</tr>


</table>                    
</div>
</div>


<!-----------------------3 columns Table Section------------------------->

<div id="identity">
<div id="header1-1">

<h3>Vehicle Info</h3>
</div>

</div>

<div class="Row">
<div class="Column">
<table id="meta" style="overflow: wrap" class="left1">

<span class="parent">
<tr>
<td class="meta-head">Make:</td>
<td>
<input  required="required" name="make" type="text"/>

</td>
</tr>

<tr>
<td class="meta-head">Model:</td>
<td>
<input  required="required" name="model" type="text"/>

</td>
</tr>
</span>
<tr>
<td class="meta-head">Year:</td>
<td>
<input  required="required" name="year" type="text"/>

</td>
</tr>                


</table>    

</div><!--1st table-->


<div class="Column">
<table id="meta" style="overflow: wrap" class="left1">

<span class="parent">
<tr>
<td class="meta-head">Vin #:</td>
<td>
<input  required="required" name="vin" type="text"/>

</td>
</tr>

<tr>
<td class="meta-head">Lic.#:</td>
<td>
<input  required="required" name="lic" type="text"/>

</td>
</tr>
</span>
<tr>
<td class="meta-head">Miles:</td>
<td>
<input  required="required" name="miles" type="text"/>

</td>
</tr>                


</table>
</div><!--2nd table-->

<div class="Column">

<table id="meta" style="overflow: wrap" class="left1">

<span class="parent">
<tr>
<td class="meta-head">Color:</td>
<td>
<input  required="required" name="color" type="text"/>

</td>
</tr>

<tr>
<td class="meta-head">R.O. #:</td>
<td>
<input  required="required" name="ro" type="text"/>

</td>
</tr>
</span>
<tr>
<td class="meta-head">P.O. #:</td>
<td>
<input  required="required" name="po" type="text"/>

</td>
</tr>                


</table>
</div><!--3rd table-->

</div><!--End 3 column table row-->






<table id="items" style="overflow: wrap; margin-top: 100px;">

<tr>
<th  colspan="6">Descryption</th>

<th>Hrs</th>
<th colspan="1">Amount</th>
</tr>

<tr class="item-row">
<td colspan="6" class="item-name">
<textarea style="padding-bottom: 300px;" name="description" rows="12" cols="5"></textarea>
<p style="font-weight: bold">*******All Parts Supplied By Shop*******</p>
</td>


<td>
<input  name="hrs" type="text"/>

</td>

<td colspan="5">

<input required="required" name="amount" type="text"/>
</td>
</tr>


<tr>
<td colspan="4">Technician #: 81 (Miguel A.)</td>
<td style="border: none;" colspan="2">Labor Hrs:</td>
<td colspan="1"><input placeholder="0"  name="labourHrs" type="text"/></td>
<td colspan="1"></td>
</tr>

<tr>
<td colspan="2">Labor Rate (Per Hr):</td>
<td  colspan="2"><input placeholder="60" required="required" name="labourRate" type="text"/></td>
<td style="border: none;" colspan="2">Labor Price:</td>
<td colspan="1"><input placeholder="0"  name="labourPrice" type="text"/></td>
<td colspan="1"></td>
</tr>

<tr>
<td style="border: none;" colspan="4"></td>
<td style="border: none;" colspan="2">Total</td>
<td colspan="1"></td>
<td colspan="1"><input  placeholder="0"  name="total" type="text"/></td>
</tr>

<tr>
<td style="border: none" colspan="4"></td>
<td colspan="3">Grand Total</td>
<td colspan="1"><input  placeholder="$0.00"  name="gTotal" type="text"/></td>
</tr>


<tr>
<td colspan="4">Signature Approval:</td>
<td colspan="4"></td>
</tr>

<tr>
<td style="border: none" colspan="4"></td>
<td style="border-right: none;" colspan="4">Paid</td>
</tr>

<tr class="no-border">
<td colspan="4"></td>
<td></td> 
<td >Yes<input type="checkbox" name="one" value="Yes( &#10003; )"></td>
<td>No ( )<input type="checkbox" name="two" value="No( &#10003; )"></td>
<td>P.O. ( )<input type="checkbox" name="three" value="P.O( &#10003; )"></td>
</tr>

<tr>

<td colspan="8">
<p style="font-size: 10px">Not responsible for loss by fire or theft or any other cause beyond our control. I hereby authorize the above repair work to be done with the necessary material & grant
permission to operate equipment for purpose of testing and inspection. An express mechanic's lien is acknowledged to secure the amount of repairs. I agree to pay
the payment in full no later than 30 days after work has been completed. After 30 days, a 1.4% monthly charge will be added to the outstanding balance.
</p>
</td>
</tr>


</table>


</div>
<h2 style="text-decoration: underline;font-style: italic;text-align: center; font-weight: bold;font-family: Brush Script Mt;">
Thanks for Your Business
</h2>
<input name="submit" class="submit" type="submit" value="Submit"/>

</form>

</body>

</html>

If you are using table and you are facing this problem then There are two tricks which work for me. I don't know if this trick is correct solutions or not.

1) Check Number of "td" should be same in all "tr" inside your table. 2) If you have used tfooter then remove that tfooter and place that tr inside tbody.

It might help you.

Uncaught Error: Call to a member function get_cellmap() on null , I am using first time DOmpdf and facing this strange issue. This is Uncaught Error: Call to a member function get_cellmap() on null #1416. Please help me! I am using first time DOmpdf and facing this strange issue. This is what i' m facing when try to get file file to convert to pdf Fatal error: Uncaught Error: Call to a member function get_cellmap() on null in C:\xampp\htd


I found this issue caused by CSS (I had padding in mm)

display: table-cell outside of a table causes a crash · Issue #691 , Fatal error: Call to a member function get_cellmap() on a non-object in /dompdf/​include/table_cell_frame_reflower.cls.php on line 30. dompdf does not currently support anonymous table objects, though we do plan to support them in a future release (see issue #449).In the meantime you can work around the issue by filling out the necessary table structure.


I also Fetch this issue and when i remove all responsive part or css from table tag then it's work properly. So Remove this part style="overflow: wrap" from your Table tag. write it like this

get_cellmap() issue with DomPDF - php, Fatal error: Uncaught Error: Call to a member function get_cellmap() on null in C:\​xampp\htdocs\dom\dompdf\src\FrameReflower\TableCell.php:37 Stack trace:  fix the problem. I added line breaks between the tags and that was sufficient. Either way, the code that causes a crash in 0.5.1 appears to run correctly in the trunk.


Getting Call to a member function get_cellmap() on null in with , I am using Dompdf 0.8.3 Any help is appreciated. Thanks. Here is my php code function genPDF() { $file = "pdf.html"; $file_size = filesize($file); $handle  SJDComputerslimited mentioned this issue Oct 27, 2017 PHP Fatal error:Uncaught Dompdf\Exception: No block-level parent found. Not good. in D:\Parallels\Plesk Panel\Vhosts\mydomain.co.uk\httpdocs\tools\dompdf\src\Positioner\Inline.php:48 #1582


dompdf error, Fatal error: Call to a member function get_cellmap() on null in Unfortunately issues with DOMPDF are out of our scope. It's a 3rd party, open  display:inline is probably throwing dompdf as far as the document structure. You might try display: inline-table if you want the table to be displayed as part of a line. I'm still not sure why white-space at the beginning of a selector would cause problems.


Fatal Error trying to create an invoice, I'm having a issue trying to create an invoice. Fatal error: Call to a member function get_cellmap() on null current/wp-content/plugins/woocommerce-pdf-​invoices-packing-slips/vendor/dompdf/dompdf/src/FrameReflower/TableRow.php​(52):  Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. get_cellmap() issue with DomPDF. 0. Dompdf\Dompdf