The margin changed on second page

1 Ansicht (letzte 30 Tage)
John
John am 25 Sep. 2020
Kommentiert: John am 29 Sep. 2020
Using the import mlreportgen.dom.* the report is OK with rpt.CurrentPageLayout.PageMargins. However, the margin changed by itself on second page (the content flows to the sedond page as it's going). Repeating the definition with margins did not correct it.
What's wrong did I do?
  4 Kommentare
John
John am 28 Sep. 2020
John
John am 28 Sep. 2020
As the content goes to the third page, the margin comes back to the same as the first page.
So, it looks like the report genrator automatically used the "book margin" to alternate the left side margin.
Now the question becomes: How to disable the "book margin" for the report generator, import mlreportgen.dom.* ?
Thanks for help!

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Rhea Chandy
Rhea Chandy am 29 Sep. 2020
The class PageMarginsObj = PageMargins() will specify default page margins for the section of the document.
In the file I’ve attached, I’ve implemented a code with dummy text that spills over to a second page.
In this case, it is following expected behavior, adhering to the set PageMargins.
  1 Kommentar
John
John am 29 Sep. 2020
Hi, Rhea:
Thanks.
I found my mistake. I copied an example which had a "PageMargins.Gutter" included. Comment out it, the page margin becomes equal on all pages.
Also, can you please help me on making the table on the same page, which is more important topic for our report project:

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by