Programmatic Report Generation - How to Create a Report in Landscape Orientation
2 次查看(过去 30 天)
显示 更早的评论
I am trying to create a report in landscape orientation using the following commands:
import mlreportgen.dom.*;
d = Document('test','pdf');
open(d);
sect = d.CurrentDOCXSection;
pageSize = sect.PageSize;
pageSize.Orientation = 'landscape';
I am not having success with this. Am I doing something wrong?
Thank you.
0 个评论
采纳的回答
Sean de Wolski
2015-3-17
The orientation is set, the page size just isn't changed.
import mlreportgen.dom.*;
d = Document('test','docx');
open(d);
sect = d.CurrentDOCXSection;
pageSize = sect.PageSize;
pageSize.Orientation = 'landscape';
pageSize.Height = '8.5in';
pageSize.Width = '11in';
close(d)
rptview(d.OutputPath)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Report Generator 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!