It seems to work but I'm unable to override the template
pdf-serialization-pdf.html.twig
in batch mode (it works in Standard)- 🇭🇺Hungary mibfire
Hi @Lus
https://www.drupal.org/project/pdf_serialization/issues/3331105#comment-... 🐛 Batch export support for Views data export module Active
So how did you try to override the
pdf-serialization-pdf.html.twig
file? I am asking because this works for me. I did with theme suggestions though./** * Implements hook_theme_suggestions_HOOK_alter(). */ function ejp_export_theme_suggestions_pdf_serialization_pdf_alter(array &$suggestions, array $variables): void { $suggestions[] = $variables['theme_hook_original'] . '__ejp_export'; }
- 🇭🇺Hungary mibfire
I added extra views variable to
pdf_serialization_pdf_header
andpdf_serialization_pdf_footer
theme functions. - First commit to issue fork.
- 🇭🇺Hungary mibfire
I made my patch compatible with 2.2.0 version and fixed a few things. For example:
- We don't have to use neither
$mpdf->SetHTMLHeader($header_rendered, 'O');
(https://git.drupalcode.org/project/pdf_serialization/-/blob/2.2.0/src/Pd...) nor
$mpdf->SetHTMLFooter($footer_rendered);
(https://git.drupalcode.org/project/pdf_serialization/-/blob/2.2.0/src/Pd...) in getPDF() method of PdfManager class because the content override the header and footer this way.
- We have to take the export method into account because there can be batch export besides the standard one.
Additionally i aligned my patch of "Views Data Export" module to 2.2.0 version too. https://www.drupal.org/node/3204269 →
- We don't have to use neither