Fix PDF css

pdf class was not added to body on pdf command
This commit is contained in:
Jeong Arm 2022-08-01 16:37:34 +09:00 committed by GitHub
parent 317f33e33c
commit 4418c0c558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ class PdfCommand extends HtmlCommand
// to our html document
$simpleDom = HtmlDomParser::str_get_html($rendered);
$body = $simpleDom->find('body', 0);
$body->class = $body->class . ' pdf';
$body->setAttribute('class', $body->getAttribute('class') . ' pdf');
$rendered = (string) $simpleDom;
// Save to a temp destination for the pdf renderer to use