V
V
Vladislav2019-05-07 15:23:39
phpspreadsheet
Vladislav, 2019-05-07 15:23:39

Why does mPdf output pdf crookedly?

Hello. I edit xls file using PHPSpreadsheet and then I want to save it to pdf using mPdf.
Here is the code:

$spreadsheet = IOFactory::load(public_path('form_3.XLS'));
$worksheet = $spreadsheet->getActiveSheet()->setCellValue('N16', $data);
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($spreadsheet);
$writer->writeAllSheets();
$writer->save("file.pdf");

What I get as a result:
5cd17930d5a9e160930610.png
What I plan to see:
5cd1798d3e3e2302080419.png
Perhaps I need to transfer some other settings, but I don’t know which ones and how.
I also tried with DomPDF, but it's even worse there.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2020-07-31
@djiggurda

Question - one to one. Let me know if you figure it out

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question