mPDF Manual – mPDF Variables

autoMarginPadding

(mPDF ≥ 4.0)

Description

mixed autoMarginPadding

Specify padding between top-margin and header in ‘stretch’ mode. When setAutoTopMargin or setAutoBottomMargin are set to 'stretch' autoMarginPadding defines the minimum distance in mm that will be forced between the bottom of the header and the top of the main text (or bottom of text and footer).

Values

autoMarginPadding 

Values

  • FLOAT Value in millimeters

Default: 2

Examples

<?php
// Require composer autoload
require_once __DIR__ . '/vendor/autoload.php';

$mpdf = new \Mpdf\Mpdf([
    'setAutoTopMargin' => 'stretch',
    'autoMarginPadding' => 5
]);

See Also

Fork me on GitHub