How to make a pagebreak in report generator by code in Matlab R2015b?
4 次查看(过去 30 天)
显示 更早的评论
Hi!
I'm trying to create a tool that generates a report and I want to make a pagebreak from my script after each section.
Does anybody know a good way of doing so, I have seen that the R2016b has a function for that but I haven't found it working in R2015b version.
t2.TableEntriesStyle = {FontFamily('Calibri'), Width('0.5in'), Color('black')};
t2.TableEntriesHAlign = 'center';
t2.TableEntriesVAlign = 'middle';
append(d,t2);´
% Between these two sections I want the pagebreak.
p = Paragraph('Chapter ');
p.Style = { CounterInc('chapter'), CounterReset('table'), WhiteSpace('preserve') };
append(p, AutoNumber('chapter'));
append(d, p);
Thanks David
0 个评论
采纳的回答
Ankitha Kollegal Arjun
2017-2-7
The possibility to add a page break in a word document is not available in MATLAB Report generator before version R2016a. However, for R2015b, there is a class called PageBreakBefore which allows you to start a paragraph on a new page. Please refer the following documentation link on how to use this object:
Also, as an alternative workaround, you can add a specific text at the position where the page break should take place. After the report is generated, use the COM/ActiveX API of Word to add the page breaks.
The following File Exchange submission allows you to add/modify features of any Word document:
更多回答(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!