fkrauthan / wp-mpdf

Print WordPress posts as PDF. Optional with Geshi highlighting.
55 stars 23 forks source link

Header & footer html problem #15

Closed julienagullo closed 3 years ago

julienagullo commented 3 years ago

Hi in wp-mpdf.php line 226 :

if ( $pdf_html_header ) { $mpdf->SetHTMLHeader( $pdf_header ); } else { $mpdf->setHeader( $pdf_header ); } if ( $pdf_html_footer ) { $mpdf->SetHTMLFooter( $pdf_footer ); } else { $mpdf->setFooter( $pdf_footer ); }

You use $pdf_header and $pdf_footer in the 2 states of the condition. So $pdf_html_header and $pdf_html_footer are never used.

Thanks for this plugin :)

Regards,

fkrauthan commented 3 years ago

I think when I added it the idea was that $pdf_html_header and $pdf_html_footer are Booleans that indicate if $pdf_header and $pdf_footer are ether raw HTML or mpdf's custom array format. Do you see any specific issue with this at the moment?

julienagullo commented 3 years ago

Hi, I'm sorry I didn't understand :) Yes it's very good like this ! Thanks a lot,