How to make a pagebreak in report generator by code in Matlab R2015b?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
studentdavid
am 1 Feb. 2017
Kommentiert: studentdavid
am 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 Kommentare
Akzeptierte Antwort
Ankitha Kollegal Arjun
am 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:
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Report Generator finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!