Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.1' into 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
robertSt7 committed Mar 12, 2024
2 parents fb647d0 + ce7c018 commit f4c14bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/js/document/printpages/pdf_preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pimcore.document.printpages.pdfpreview = Class.create({
style: "float: right; margin-top: 10px",
handler: function () {
var date = new Date();
var url = Routing.generate('pimcore_bundle_document_printpage_pdfdownload', {id: this.page.id, download: 1, time: date.getTime()});
var url = Routing.generate('pimcore_bundle_web2print_document_printpage_pdfdownload', {id: this.page.id, download: 1, time: date.getTime()});
pimcore.helpers.download(url);
}.bind(this)
});
Expand Down
5 changes: 3 additions & 2 deletions src/Processor/Chromium.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ public function getPdfFromString(string $html, array $params = [], bool $returnF
]);
}

$page = $browser->createPage();

try {
$page = $browser->createPage();
$page->setHtml($html, 5000);

$pdf = $page->pdf($params);
Expand All @@ -136,7 +137,7 @@ public function getPdfFromString(string $html, array $params = [], bool $returnF
Logger::debug('Could not create pdf with chromium: '. print_r($e, true));
$output = (string) $e;
} finally {
$browser->close();
$page->close();
}

return $output;
Expand Down

0 comments on commit f4c14bc

Please sign in to comment.