Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel 导出为PDF时将图纸方向设置为全屏_Laravel_File_Pdf_Maatwebsite Excel - Fatal编程技术网

Laravel 导出为PDF时将图纸方向设置为全屏

Laravel 导出为PDF时将图纸方向设置为全屏,laravel,file,pdf,maatwebsite-excel,Laravel,File,Pdf,Maatwebsite Excel,我试图得到的方向表全屏,而导出到pdf格式。这是我的密码 Excel::create('Benchmark Constituents', function($excel) use ($Array_data) { $excel->setTitle('Benchmark Constituents'); $excel->setDescription('File containing

我试图得到的方向表全屏,而导出到pdf格式。这是我的密码

        Excel::create('Benchmark Constituents', function($excel) use ($Array_data) {

            $excel->setTitle('Benchmark Constituents');                     
            $excel->setDescription('File containing Benchmark Constituents');

        $excel->sheet('sheet1', function($sheet) use ($Array_data) {
            $sheet->setOrientation('landscape');                                                            
            $sheet->mergeCells('E1:G1');
            $sheet->cell('E1', function($cell) {
                $cell->setValue('Benchmark Constituents');
                $cell->setAlignment('center');
                $cell->setFontColor('#ffffff');
                $cell->setBackground('##000000');
                $cell->setFont(array(
                    'family'     => 'Calibri',
                    'size'       => '16',
                    'bold'       =>  true
                    ));
            });                                                                                         
            $sheet->fromArray($Array_data, null,"A3",true);
            $sheet->row(3, function($row) {
                $row->setBackground('#808080');
                $row->setFontColor('#ffffff');
            });
            $sheet->row(1, function($row) {
                $row->setBorder('none');
            });
            $sheet->row(2, function($row) {
                $row->setBorder('none');

            });
        });
    })->download('pdf');
我将此文件作为输出,一些表列由于页面宽度而被隐藏:


尝试将页边距设置为0

// Set all margins to 0
$sheet->setPageMargin(0);

有人能帮忙解决这个问题吗