You can get an approximation of the html before the pdf render by overriding the render function in classes/pdf/PDF.php to:
public function render($display = true)
{
$render = false;
$this->pdf_renderer->setFontForLang(Context::getContext()->language->iso_code);
foreach ($this->objects as $object) {
$this->pdf_renderer->startPageGroup();
$template = $this->getTemplateObject($object);
if (!$template) {
continue;
}
if (empty($this->filename)) {
$this->filename = $template->getFilename();
if (count($this->objects) > 1) {
$this->filename = $template->getBulkFilename();
}
}
$template->assignHookData($object);
// for previewing html
echo $template->getHeader();
echo $template->getContent();
echo $template->getFooter();
exit;
$this->pdf_renderer->createHeader($template->getHeader());
$this->pdf_renderer->createFooter($template->getFooter());
$this->pdf_renderer->createPagination($template->getPagination());
$this->pdf_renderer->createContent($template->getContent());
$this->pdf_renderer->writePage();
$render = true;
unset($template);
}
if ($render) {
// clean the output buffer
if (ob_get_level() && ob_get_length() > 0) {
ob_clean();
}
return $this->pdf_renderer->render($this->filename, $display);
}
}
Added the echo for the header, content and footer. For pagination I'm not sure how it would work, haven't tested.