Some more digging - Installed wkhtmltopdf . CA docs recommends version 0.12.1 but could not find it in git repository so installed a version for Ubunt 22.04 ver 0.12.6.
Edited php header as shown below .
when using CA default logo.svg everything prints ok including header image. Tried using other default CA logo ca_logo.png - failed with error "could not generate pdf'
Tried using mylogo.png and got failed with error "could not generate pdf"
So Both dompdf and wkhtmltopdf will print pdf summaries if I use the CA default logo.svg but will not print any logos with .png extension.
Below is my code after case wkhtml in header.php
?>
<div id='header'>
<?php
if($t_display=$this->getVAR('t_display'));
if(file_exists($this->request->getThemeDirectoryPath()."/graphics/logos/".$this->request->config->get('report_img'))){
print '<img src="'.$this->request->getThemeDirectoryPath().'/graphics/logos/'.$this->request->config->get('report_img').'" class="headerImg"/>';
}
if($t_display->get('display_code')=='accession_record') //my edit
{print"<div class='headerText'>"._('ACCESSION RECORD')."</div>";} //my edit
if($t_display->get('display_code')=='entity_record') //my edit
{print"<div class='headerText'>"._('ENTITY RECORD')."</div>";} //my edit
if ($this->request->config->get('summary_page_numbers')) {
print "<div class='pagingText'>"._t('Page')." </div>";
}
?>
</div>
<?php
?>
<!--BEGIN HEADER--><!DOCTYPE html>
<html>
<head >
<div id="head">
<?php
if(file_exists($this->getVar('base_path')."/local/pdf.css")){
?>
<link type="text/css" href="<?php print $this->getVar('base_path'); ?>/local/pdf.css" rel="stylesheet" />
<?php
} else {
?>
<link type="text/css" href="<?php print $this->getVar('base_path'); ?>/pdf.css" rel="stylesheet" />
<?php
}
if(file_exists($this->request->getThemeDirectoryPath()."/graphics/logos/".$this->request->config->get('report_img'))){
print '<img src="'.$this->request->getThemeDirectoryPath().'/graphics/logos/'.$this->request->config->get('report_img').'" class="headerImg"/>';
}
print "<div class='pagingText' id='pagingText' style='position: absolute; top: 0px; right: 0px;'> </div>";
?>
<script>
function dynvar() {
var vars = {};
var x = document.location.search.substring(1).split('&');
for (var i in x) {
var z = x[i].split('=',2);
if (!vars[z[0]]) {
vars[z[0]] = unescape(z[1]);
}
}
document.getElementById('pagingText').innerHTML = 'page ' + vars.page; // + ' of ' + vars.topage
}
</script>
</div>
</head>
<body onload='dynvar();'>
</body>
</html>
<!--END HEADER-->
<?php
}
}