public function DomPdf::addPage in Entity Print 8
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 PdfEngineInterface::addPage
File
- src/
Plugin/ EntityPrint/ PdfEngine/ DomPdf.php, line 114
Class
- DomPdf
- @PdfEngine( id = "dompdf", label = @Translation("Dompdf") )
Namespace
Drupal\entity_print\Plugin\EntityPrint\PdfEngineCode
public function addPage($content) {
// We must keep adding to previously added HTML as loadHtml() replaces the
// entire document.
$this->html .= (string) $content;
$this->pdf
->loadHtml($this->html);
}