The problem is that Cyrillic letters not displaying in PDF form created with pdftk
, specifically using mikehaertl/php-pdftk package:
When clicked, the symbols are displaying:
In Windows 10 Acrobat Reader similar file looks like this:
Here is the code:
$pdf = new \mikehaertl\pdftk\Pdf(public_path("demo_form_template.pdf"));
$values = [
"name" => "МНОГОКРАТНАЯ",
"address" => "English text",
];
$pdf->fillForm($values)
->needAppearances()
->saveAs(public_path('demo_form_filled.pdf');
To summarise, when opened in
- MacOS Google Chrome - displays not correctly
- MacOS Acrobat Reader - displays OK
- Windows 7 Acrobat Reader - displays OK
- Windows 10 Acrobat Reader - displays not correctly
- Ubuntu Acrobat Reader - displays not correctly
Any ideas? Should I consider another solution to generate PDFs? Or may be consider fpdf
or other?
via Petr Reshetin