Changing $languages = \Drupal::languageManager()->getLanguages();
to $languages = locale_translatable_language_list();
in /core/includes/install.core.inc didn't solve my problem. Still getting errors like "Admin Toolbar (3.3.0). File not found at https://ftp.drupal.org/files/translations/all/admin_toolbar/admin_toolba..." errors for all module translations. I also got a lot of strings in a wrong other language.
I have currently only English as language and "Enable interface translation to English" is true.
I really need a solution for this annoying problem. Running Drupal 9.5.7
Changing
'%core' => $project->core
to
'%core' => 'all'
in /core/modules/locale/locale.translation.inc didn't solve my problem. Still getting errors like "Admin Toolbar (3.3.0). File not found at https://ftp.drupal.org/files/translations/all/admin_toolbar/admin_toolba..." errors for all module translations. I also got a lot of strings in a wrong other language.
I have currently only English as language and "Enable interface translation to English" is true.
I really need a solution for this annoying problem.
I got a quick hard coded solution working.
In /modules/contrib/entity_print/src/Plugin/EntityPrint/PrintEngine/PhpWkhtmlToPdf.php:
$this->pdf = new Pdf([
'binary' => $this->configuration['binary_location'],
'orientation' => $this->configuration['default_paper_orientation'],
'username' => $this->configuration['username'],
'password' => $this->configuration['password'],
'page-size' => $this->configuration['default_paper_size'],
'zoom' => $this->configuration['zoom'],
'viewport-size' => $this->configuration['viewport_size'],
'page-width' => '2in',
'page-height' => '2in',
]);
This could be implemented as a nice feature to the module. I will try to create a patch to propose to merge it, if I can find some time.
I try to get a custom size paper working with Wkhtmltopdf. I created a new event Subscriber, but it doesn't work because --page-width and --page-height options are not supported, and only setting the paper size using the default_paper_size option is supported.
The subscriber works with:
$update_config = [
'default_paper_size' => 'A4',
];
But not with:
$update_config = [
'page_width' => '2.5in',
'page_height' => '3.5in',
];
Any direction how I can define a custom paper size with Wkhtmltopdf?