• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Error generating document: Failed to generate PDF: Unable to load css file

Rar9

Regular Pleskian
I´m using php 7.1 for my Drupal 8.35 site and get error when trying to print with DOMPDF.

I get this error Error generating the document:

Drupal\entity_print\PrintEngineException: Failed to generate PDF: Unable to load css file https://<domain>/sites/default/files/css/css_47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU.css?ov8un6 in Drupal\entity_print\Plugin\EntityPrint\PrintEngine\DomPdf->send() (line 156 of /var/www/vhosts/<domain>/httpdocs/modules/entity_print/src/Plugin/EntityPrint/PrintEngine/DomPdf.php).

but the give CSS file exists but is empty

Permissions are 777

DomPdf.php Line 156 is in RED below:

/**
* {@inheritdoc}
*/
public function send($filename, $force_download = TRUE) {
$this->doRender();

// Dompdf doesn't have a return value for send so just check the error
// global it provides.
if ($errors = $this->getError()) {
throw new PrintEngineException(sprintf('Failed to generate PDF: %s', $errors));
}

// The Dompdf library internally adds the .pdf extension so we remove it
// from our filename here.
$filename = preg_replace('/\.pdf$/i', '', $filename);

// If the filename received here is NULL, force open in the browser
// otherwise attempt to have it downloaded.
$this->dompdf->stream($filename, ['Attachment' => $force_download]);
}


I have the feeling that something is misconfigured, but I´m running out of ideas.

Anyone have some ideas how to debug this?
 
Back
Top