如何在mPDF中设置自定义页面大小? [英] How to set custom page size in mPDF?

查看:859
本文介绍了如何在mPDF中设置自定义页面大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要有关mPDF的帮助.我想设置我的自定义页面大小(恰好:宽度49mm和高度200mm),但是找不到解决方案.我找到了mPDF()手册( http://mpdf1.com/manual/index.php?tid=184),但是只有现成的格式,例如A4,B5等.我必须设置自己的页面格式.

I need some help with mPDF. I want to set up my custom page size (exactly: width 49mm and height 200mm), but I can not find solution. I found mPDF() manual (http://mpdf1.com/manual/index.php?tid=184) but there are only ready formats like A4, B5 etc. I have to set up my own page format.

推荐答案

有一个示例显示了如何使用宽度和高度初始化页面.

There is an example that shows how to initiate the page with width and height.

// Define a page size/format by array - page will be 190mm wide x 236mm height
$mpdf=new mPDF('utf-8', array(190,236));

这篇关于如何在mPDF中设置自定义页面大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆