public function DomPdf::addPage in Entity Print 8.2
Add a string of HTML to a new page.
Parameters
string $content: The string of HTML to add to a new page.
Return value
$this
Overrides PrintEngineInterface::addPage
File
- src/
Plugin/ EntityPrint/ PrintEngine/ DomPdf.php, line 176
Class
- DomPdf
- A Entity Print plugin for the DomPdf library.
Namespace
Drupal\entity_print\Plugin\EntityPrint\PrintEngineCode
public function addPage($content) {
// We must keep adding to previously added HTML as loadHtml() replaces the
// entire document.
$this->html .= (string) $content;
$this->dompdf
->loadHtml($this->html);
}