From 4418c0c558cd1b6599b240b0af15d06f92588209 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Mon, 1 Aug 2022 16:37:34 +0900 Subject: [PATCH] Fix PDF css pdf class was not added to body on pdf command --- src/Resume/Command/PdfCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resume/Command/PdfCommand.php b/src/Resume/Command/PdfCommand.php index 1031368..f9db249 100644 --- a/src/Resume/Command/PdfCommand.php +++ b/src/Resume/Command/PdfCommand.php @@ -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