按页缩放
函数原型
fitToPages(int $width, int $height): selfint $width
int $height
示例
$config = [
'path' => './tests'
];
$fileObject = new \Vtiful\Kernel\Excel($config);
$fileObject = $fileObject->fileName('tutorial.xlsx');
$filePath = $fileObject->header(['name', 'age', 'city', 'email'])
->data([
['viest', 21, 'Beijing', '[email protected]'],
['wjx', 21, 'Shanghai', '[email protected]']
])
->fitToPages(1, 0) // 宽度压到一页,纵向不限
->output();Last updated