• Resolved herrstrietzel

    (@15broetchenmann)


    Hi Florian,

    I wonder who I can customize my page margins.
    The css @page rule works well for page margins but both html footer and header get stripped. In former versions of mpdf I could use something like this in my template.php but it doesn’t seem to work anymore

    
     $pdf_margin_left =20;
     $pdf_margin_right=20;
     $pdf_margin_top=50;
     $pdf_margin_bottom=50;
     $pdf_margin_header=50;
     $pdf_margin_footer=50;
    

    Maybe due to a newer version of mpdf library.
    I’m using wp-mpdf v.3.2
    Great Plugin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter herrstrietzel

    (@15broetchenmann)

    Aaah!

    adding the global definitions in my template file solved the problem

    	global $pdf_margin_left;
    	global $pdf_margin_right;
    	global $pdf_margin_top;
    	global $pdf_margin_bottom;
    	global $pdf_margin_header;
    	global $pdf_margin_footer;
    

    But I’d also like to use the css @page method if possible.
    Regards,
    Patrick

    Plugin Author fkrauthan

    (@fkrauthan)

    Sorry for the late reply as I was on vacation. Glad you figured it out yourself. Unfortunately the @page directive would have to come from MPDF which sounds like is not supported in the current version that is used for this plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘page margins and css @page and header/footer margins’ is closed to new replies.