How to make a pagebreak in report generator by code in Matlab R2015b?
4 views (last 30 days)
Show older comments
studentdavid
on 1 Feb 2017
Commented: studentdavid
on 7 Feb 2017
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 Comments
Accepted Answer
Ankitha Kollegal Arjun
on 7 Feb 2017
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:
More Answers (0)
See Also
Categories
Find more on MATLAB Report Generator in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!