How to make a pagebreak in report generator by code in Matlab R2015b?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
studentdavid
el 1 de Feb. de 2017
Comentada: studentdavid
el 7 de Feb. de 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 comentarios
Respuesta aceptada
Ankitha Kollegal Arjun
el 7 de Feb. de 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:
Más respuestas (0)
Ver también
Categorías
Más información sobre MATLAB Report Generator en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!