Skip to content

Commit

Permalink
Merge branch 'feature/map-export-pdf' of github.com:CartONG/plateform…
Browse files Browse the repository at this point in the history
…e-urbaine-cameroun into feature/map-export-pdf
  • Loading branch information
0live committed Feb 5, 2025
2 parents cc3ddee + 980c361 commit 4d1e207
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion symfony/src/Controller/Map/MapPdfController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function exportMap(Request $request, PdfGenerator $pdfGenerator): Respons
}

$pdfContent = $pdfGenerator->generate('pdf/map.html.twig', [
'map_url' => $mapImage
'map_url' => $mapImage,
]);

return new Response($pdfContent, 200, [
Expand Down
2 changes: 1 addition & 1 deletion symfony/src/Services/Service/PdfGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function generate(string $template, array $data = []): string
$options->set('isRemoteEnabled', true); // Allow remote images

$dompdf = new Dompdf($options);

$html = $this->twig->render($template, $data);

$dompdf->loadHtml($html);
Expand Down

0 comments on commit 4d1e207

Please sign in to comment.