Я работаю с DomPdf и пытаюсь преобразовать файл в PDF, но получаю следующую ошибку:
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
Код:
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:
Pro Tech Diagnostics
26893 Bouquet Canyon Rd. Suite C204 Saugus, CA 91350
Phone # (818)644-1965
Fax # (661) 468-7504
Customer Info
Name
Address
Phone
Invoice#
Paid Date
Vehicle Info
Make:
Model:
Year:
Vin #:
Lic.#:
Miles:
Color:
R.O. #:
P.O. #:
Descryption
Hrs
Amount
*******All Parts Supplied By Shop*******
Technician #: 81 (Miguel A.)
Labor Hrs:
Labor Rate (Per Hr):
Labor Price:
Total
Grand Total
Signature Approval:
Paid
Yes
No ( )
P.O. ( )
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.
Thanks for Your Business
Подробнее здесь: https://stackoverflow.com/questions/431 ... ap-on-null