Answer the question
In order to leave comments, you need to log in
How to set PDF encoding to UTF-8 in PhpSpreadsheet's library?
How to save file in UTF-8 encoding?
require 'vendor/autoload.php'
use PhpOffice\PhpSpreadsheet\Writer\Pdf\Tcpdf;
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$writerPDF = new Tcpdf($spreadsheet);
$writerPDF->writeAllSheets();
$writerPDF->setPreCalculateFormulas(false);
$writerPDF->save($file.'.pdf');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question