Problèmes de configuration d'impression pdf du moteur phpwkhtmltopdf

Nov 13 2020

La capture d'écran ci-dessous montre mes configurations d'impression d'entité pour les fichiers PDF créés à partir du contenu du nœud.

Comme le montre la capture d'écran, j'utilise le moteur phpwkhtmltopdf et le package mikehaertl / phpwkhtmltopdf est installé via composer.

Cependant, lorsque j'essaie de générer le PDF cible, les erreurs suivantes se produisent:

Erreur lors de la génération du document: Impossible de générer le PDF: /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: 1: /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: impossible d'ouvrir? Php: Aucun fichier de ce type /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: 2: /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: namespace: not found / opt / drupal / vendor / mikehaertl / phpwkhtmltopdf / src / Pdf.php: 4: /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: utilisation: non trouvé /opt/drupal/vendor/mikehaertl/phpwkhtmPdf/spdf/ 6: /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: / bin: Autorisation refusée /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: 7: / opt / drupal / vendor / mikehaertl / phpwkhtmltopdf / src / Pdf.php: INSTALL.txt: non trouvé /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: 8: / opt / drupal / vendor / mikehaertlrc / phpwkhtmltopdf / src / sdf / pdf. php: INSTALL.txt: introuvable /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: 9: / opt / drupal / vendor / mikehaertl / phpwkht mltopdf / src / Pdf.php: INSTALL.txt: introuvable /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: 10: /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: INSTALL.txt: introuvable /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: 12: /opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: Erreur de syntaxe: nouvelle ligne inattendue

J'ai également donné des autorisations Pdf.php 777.

Quelqu'un peut-il aider s'il vous plaît?

Réponses

NoSssweat Nov 14 2020 at 00:42

/opt/drupal/vendor/mikehaertl/phpwkhtmltopdf/src/Pdf.php: impossible d'ouvrir? php: Aucun fichier de ce type

Vous devez installer la bibliothèque manquante à l'aide de composer

composer require mikehaertl/phpwkhtmltopdf

En outre, vous devrez peut-être également h4cc/wkhtmltopdfconsulter la documentation Entity Print