答案 0 :(得分:0)
marginTop :浮动,设置新文档的页面顶部边距(以毫米为单位)。
您可以使用'marginTop'=> 119
答案 1 :(得分:0)
可以使用以下语法设置边距,对于上边距,请根据需要调整marginTop
new Pdf([
'mode' => '', // leaner size using standard fonts
'format' => Pdf::FORMAT_A4,
'orientation' => Pdf::ORIENT_LANDSCAPE,
'marginTop' => 0,
'marginBottom' => 0,
'marginLeft' => 0,
'marginRight' => 0,
'destination' => Pdf::DEST_BROWSER,
'content' => $this->renderPartial('certificate_pdf', ['']),
'options' => [
// any mpdf options you wish to set
],
'methods' => [
'SetTitle' => '',
'SetSubject' => '',
'SetHeader' => [''],
'SetFooter' => [''],
'SetAuthor' => 'Ajira Tracking',
'SetCreator' => 'Ajira Tracking',
'SetKeywords' => 'Ajira Tracking',
]
]);