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!