Skip to content

EspoCRM – Open Source CRM Application

Dompdf attachment mime type

Yurii0bfb67e7e60f
diff --git a/application/Espo/Tools/Pdf/Dompdf/EntityPrinter.php b/application/Espo/Tools/Pdf/Dompdf/EntityPrinter.php
index 7e74bb940e..787ce9f619 100644
--- a/application/Espo/Tools/Pdf/Dompdf/EntityPrinter.php
+++ b/application/Espo/Tools/Pdf/Dompdf/EntityPrinter.php
@@ -88,8 +88,9 @@ class EntityPrinter implements EntityPrinterInterface
$name = $attachment->getName() ?? 'file-' . $i;
$description = $attachmentWrapper->getDescription() ?? '';
+ $mimeType = $attachment->getType() ?? 'application/octet-stream';
- $cPdf->addEmbeddedFile($path, $name, $description);
+ $cPdf->addEmbeddedFile($path, $name, $description, $mimeType, [$cPdf->catalogId => 'Data']);
}
}
}