Skip to content

Commit

Permalink
fix(common/pdf): allow domPDF to use TempFile (in the system dir) (#1086
Browse files Browse the repository at this point in the history
)
  • Loading branch information
theus77 authored Dec 4, 2024
1 parent 92980f9 commit 895350b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions EMS/common-bundle/src/Service/Pdf/DomPdfPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public function __construct(string $projectDir, string $cacheDir)
if (!\str_starts_with($cacheDir, $projectDir)) {
$this->domPdfRootDirectories[] = $cacheDir;
}
$sysCacheDir = \sys_get_temp_dir();
if (!\str_starts_with($sysCacheDir, $projectDir) && !\str_starts_with($sysCacheDir, $cacheDir)) {
$this->domPdfRootDirectories[] = $cacheDir;
}
}

public function getPdfOutput(PdfInterface $pdf, ?PdfPrintOptions $options = null): PdfOutput
Expand Down

0 comments on commit 895350b

Please sign in to comment.