Avoid Page Break in MATLAB Report Generator

16 Ansichten (letzte 30 Tage)
Pablo Manrique Merchán
Pablo Manrique Merchán am 25 Apr. 2024
Kommentiert: Morgan am 13 Feb. 2025 um 10:06
I am using MATLAB Report Generator to create a PDF report. By default, it inserts a page break after each section. How can I disable that option?
  1 Kommentar
Morgan
Morgan am 13 Feb. 2025 um 10:06
Hi @Pablo Manrique Merchán, did you ever solve your problem? I have the same question. What I've found is that mlreportgen.dom.PDFPageLayout Class has a property called SectionBreak, but the only options are 'Next Page, 'Odd Page' or 'Even Page'. Nothing about no page breaks.
Anything that you find to this would be greatly appreciated.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Raj
Raj am 26 Apr. 2024
There are two approaches you might be taking to generate a PDF report in MATLAB.
  • Through Template- If you are using a template to generate report, Unde the Layout, you will find an option to control page breaks after sections. Update the template according to your requirements.
  • Through MATLAB script- If you're using MATLAB code to generate the report, you can change where the pages breaks by editing the code. To do this, remove the following code lines you may find after each section where you do not intend to break the page-
br = PageBreak();
append(d,br); %d = Document("mydoc","pdf");
For better understanding on how to use MATLAB Report Generator, you can refer to the following resources-
I hope this solves your query!

Produkte


Version

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by