Pantheon Community

WKHTMLTOPDF headers/footers do not work

Hi guys,
Does anyone have a code sample how to get that staff (entity_print & wkhtmltopdf) in working order?
I’ve tried to use commented options with no success.

$this->pdf = new Pdf([
  'binary'          => $this->configuration['binary_location'],
  'orientation'     => $this->configuration['orientation'],
  'username'        => $this->configuration['username'],
  'password'        => $this->configuration['password'],
  //'header-left'     => '123354436754785678',
  //'footer-left'     => '009820984234234234',
  //'header-html'     => 'header.html',
  'footer-html'     => $footer,
  'page-size'       => $this->configuration['default_paper_size'],
  'zoom'            => $this->configuration['zoom'],
  'viewport-size'   => $this->configuration['viewport_size'],
  //'default-header'  => 'sample page default header ',
]);

Maybe somebody knows how to use non-empty pdf page as a template with a wkhtmltopdf library?

1 Like

Great question @bus_iii!

@sparklingrobots maybe you can provide some additional insight here or know someone else who can! :slight_smile: