Page 1 of 1
View PDF Report doesn't show cyrillic and latin accented characters
Posted: 21 Jun 2022, 08:56
by Nidzo
How and what to change to PDF Report display cyrillic and latin accented characters correctly? HTML view is displayed OK. I use Phoca PDF and Invoices and orders are displayed OK too.
Also how can I change time/date format to dd.mm.YYYY in Report?
Thanks!

Re: View PDF Report doesn't show cyrillic and latin accented characters
Posted: 21 Jun 2022, 11:52
by Jan
Hi, it depends on used PDF font in Phoca PDF. You need to install font which includes cyrillic characters.
Try to see some of the following fonts:
https://www.phoca.cz/download/category/ ... apdf-fonts (Dejavu fonts should include a lot of different national characters, so maybe this font should help)
The report has own layout which can be overrided by template:
administrator/components/com_phocacart/layouts/report.php
so you can cutomize the date for you there.
Jan
Re: View PDF Report doesn't show cyrillic and latin accented characters
Posted: 10 Feb 2023, 11:35
by Nidzo
Unfortunately, I was unable to change the date. It becomes frustrating.
When I change $format = '%Y-%m-%d'; to any other value I get error
An error has occurred.
500 Incorrect DATE value: '11-01-2023'
Code: Select all
error - Uncaught Throwable of type Exception thrown with message "Incorrect DATE value: '21-12-2022'". Stack trace: #0 [ROOT]\libraries\src\MVC\Controller\BaseController.php(639): PhocaCartCpViewPhocacartReports->display() #1 [ROOT]\administrator\components\com_phocacart\controller.php(91): Joomla\CMS\MVC\Controller\BaseController->display(false, Array) #2 [ROOT]\libraries\src\MVC\Controller\BaseController.php(672): phocaCartCpController->display() #3 [ROOT]\administrator\components\com_phocacart\phocacart.php(25): Joomla\CMS\MVC\Controller\BaseController->execute('') #4 [ROOT]\libraries\src\Dispatcher\LegacyComponentDispatcher.php(71): require_once('C:\\wamp64\\www\\z...') #5 [ROOT]\libraries\src\Dispatcher\LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}('C:\\wamp64\\www\\z...') #6 [ROOT]\libraries\src\Component\ComponentHelper.php(355): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() #7 [ROOT]\libraries\src\Application\AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent('com_phocacart') #8 [ROOT]\libraries\src\Application\AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch() #9 [ROOT]\libraries\src\Application\CMSApplication.php(294): Joomla\CMS\Application\AdministratorApplication->doExecute() #10 [ROOT]\administrator\includes\app.php(61): Joomla\CMS\Application\CMSApplication->execute() #11 [ROOT]\administrator\index.php(32): require_once('C:\\wamp64\\www\\z...') #12 {main}
I was also unable to solve the problem with Cyrillic and Latin accented letters too. I tried various fonts that Phoca Cart offers, but the problem only occurs in Reports. Invoices and orders are displayed OK
I would appreciate the help!
Joomla 4.2.7
Phoca Cart 4.0.5 and 4.0.6Beta13
PHP 8.1
Re: View PDF Report doesn't show cyrillic and latin accented characters
Posted: 12 Feb 2023, 10:06
by jpeters
its not only font but also caracter set depended.
Re: View PDF Report doesn't show cyrillic and latin accented characters
Posted: 12 Feb 2023, 18:11
by Nidzo
It occurred to me but I don't know how to change it.
Re: View PDF Report doesn't show cyrillic and latin accented characters
Posted: 14 Feb 2023, 01:18
by Jan
Hi, can you paste the screenshot of the error, I see trace but I don't see the first error file and its line.
The PDF creating is the same for all - invoices or reports, Can you send me some text and font you are using, so I can test it.
Jan
Re: View PDF Report doesn't show cyrillic and latin accented characters
Posted: 14 Feb 2023, 14:44
by Nidzo
DATE FORMAT
Cahnged to
%d-%m-%Y
Default format
%Y-%m-%d
ACCENTED CHARACTERS IN PDF REPORT
Fonts for Phoca PDF I tried are Dejavu Sans, Free Mono, Free Sans, Helvetica.
Joomla Administration font is Joomla default.
Example:
Đorđe Šačević (latin with accented characters)
Петар Петровић (cyrillic characters)

Re: View PDF Report doesn't show cyrillic and latin accented characters
Posted: 14 Feb 2023, 15:34
by Jan
Hi,
1) the date format deprecated is Joomla core problem - here described:
https://github.com/joomla/joomla-cms/issues/38276
So still not solved, under review, we will see which solution will be selected
2) Characters in PDF
Try to install 4.0.6 Beta 15:
https://github.com/PhocaCz/PhocaCart/re ... Beta15.zip
It should be OK there (tested with Dejavusans font):
Jan
Re: View PDF Report doesn't show cyrillic and latin accented characters
Posted: 14 Feb 2023, 19:14
by Nidzo
1. O.K.
2. There is no more problem with characters in 4.0.6 Beta 15. Great job Jan!
Just curious. What caused the problem?
Re: View PDF Report doesn't show cyrillic and latin accented characters
Posted: 18 Feb 2023, 21:08
by Jan
Hi,
obsolete code in style, for the report, there was in style defined "font-family: arial" which got the pripority before setting the font in Phoca PDF. This is why the characters worked well in other PDFs but not in the report.