Currently I'm failing to use dompdf inside my own PHAR file.
When it comes to create the Dompdf object, I get an error:
require(/lib/fonts/dompdf_font_family_cache.dist.php): failed to open stream: No such file or directory
My call stack is:
FontMetrics.php!Dompdf\FontMetrics->loadFontFamilies() Line 133
FontMetrics.php!Dompdf\FontMetrics->__construct() Line 72
Dompdf.php!Dompdf\Dompdf->__construct() Line 302
I tried to do some workaround here. First, I thought about providing these options:
$options->set('temp_dir', 'TODO');
$options->set('font_dir', 'TODO');
$options->set('font_cache', 'TODO');
But I'm unsure whether this will ever work, because for these three options, in
the source code it says:
The directory specified must be writeable by the webserver process
So I'm unsure how to proceed.
My question therefore:
Is there any advise on how to make your awesome library also work inside a PHAR file?