- 🇩🇪Germany jan kellermann
Drupal 7 is end of live.
If you want to use PDF using mPDF → for your Drupal 10/11 please checkout new version 3.x → .
See http://mpdf1.com/manual/index.php?tid=313 ...
You can place tags for headers and footers into the node:
<!--mpdf
<htmlpageheader name="firstPageHeader">
<div style="text-align: right; border-bottom: 1px solid #000000; font-weight: bold; font-size: 10pt;">My document</div>
</htmlpageheader>
<htmlpageheader name="PageHeader">
<div style="border-bottom: 1px solid #000000; font-weight: bold; font-size: 10pt;">My document</div>
</htmlpageheader>
<htmlpagefooter name="firstPageFooter">
<table width="100%" style="vertical-align: bottom; font-family: serif; font-size: 8pt;
color: #000000; font-weight: bold; font-style: italic;"><tr>
<td width="33%"><span style="font-weight: bold; font-style: italic;">{DATE j-m-Y}</span></td>
<td width="33%" align="center" style="font-weight: bold; font-style: italic;">{PAGENO}/{nbpg}</td>
<td width="33%" style="text-align: right; ">My document</td>
</tr></table>
</htmlpagefooter>
<sethtmlpageheader name="firstPageHeader" value="on" show-this-page="1" />
<sethtmlpageheader name="PageHeader" value="on" />
<sethtmlpagefooter name="PageFooter" value="on" />
mpdf-->
this gives additional possibilities:
- print a different header for first page
- printing node variables / fields into the header / footer area of the pdf
maybe it would be nice to have on the admin configuration page two additional checkboxes with a link to the documentation of mpdf:
- use node template to store the header(s)
- use node template to store the footer(s)
with an additional condition for this structure in the module code:
Enabling header option if available.
$header = variable_get('pdf_using_mpdf_pdf_header');
if (isset($header) && $header != NULL) {
$mpdf->SetHTMLHeader($header);
}
Enabling Footer option if available.
$footer = variable_get('pdf_using_mpdf_pdf_footer');
if (isset($footer) && $footer != NULL) {
$mpdf->SetHTMLFooter($footer);
}
thanks and br sb
Closed: outdated
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Drupal 7 is end of live.
If you want to use PDF using mPDF → for your Drupal 10/11 please checkout new version 3.x → .