Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Page Break in Report Generator

Subject: Page Break in Report Generator

From: Ben

Date: 29 Apr, 2009 13:37:01

Message: 1 of 6

Hello,

I am writing a program to publish data to a pdf report. I am looking for a way to have a page break inserted during a loop in report generator. Is this possible?

Thanks,

->Ben

Subject: Page Break in Report Generator

From: Naresh Pai

Date: 8 Dec, 2010 04:54:04

Message: 2 of 6

"Ben " <bhager@cirrusdesign.com> wrote in message <gt9l5t$ci4$1@fred.mathworks.com>...
> Hello,
>
> I am writing a program to publish data to a pdf report. I am looking for a way to have a page break inserted during a loop in report generator. Is this possible?
>
> Thanks,
>
> ->Ben

I am having the same issue. Is it possible to insert a page break when publishing a code to pdf report?

Thanks,
Naresh

Subject: Page Break in Report Generator

From: Randall

Date: 12 Jan, 2011 18:41:05

Message: 3 of 6

I had the same problem. One way that works for reports that are output as Word documents is to create a special Word document that only contains a page break (CNTRL-Return). Save this using a name like "pagebreak.doc". You can then insert this file into your report using the report generator insert file command anywhere you need a page break.

Subject: Page Break in Report Generator

From: Riley Wright

Date: 6 May, 2011 15:49:05

Message: 4 of 6

"Naresh Pai" <npai@uark.edu> wrote in message <idn31c$pt9$1@fred.mathworks.com>...
> "Ben " <bhager@cirrusdesign.com> wrote in message <gt9l5t$ci4$1@fred.mathworks.com>...
> > Hello,
> >
> > I am writing a program to publish data to a pdf report. I am looking for a way to have a page break inserted during a loop in report generator. Is this possible?
> >
> > Thanks,
> >
> > ->Ben
>
> I am having the same issue. Is it possible to insert a page break when publishing a code to pdf report?
>
> Thanks,
> Naresh

I am having the same problem. I am trying to use an Eval MATLAB Expression component that calls a custom function PageBreak(). In PageBreak(), I am trying to use "fprintf ('\f')", where \f is a form feed (new page), but I get an error saying that \f is not understood. Is there another code that I can "print" using frprintf that will force a page break?

Subject: Page Break in Report Generator

From: Tomas

Date: 12 Nov, 2013 12:30:26

Message: 5 of 6

"Ben " <bhager@cirrusdesign.com> wrote in message <gt9l5t$ci4$1@fred.mathworks.com>...
> Hello,
>
> I am writing a program to publish data to a pdf report. I am looking for a way to have a page break inserted during a loop in report generator. Is this possible?
>
> Thanks,
>
> ->Ben

Hi,
Late answer but anyway I found this question as well as several similar when I tried to find out how to force the report generator to insert a page brake. No answers so at last I tried to insert this in a text segment in a paragraph:

  %<sprintf('\L')>

It seems to work for my need at least. I think the trick is sprintf instead of fprintf as at least the %< > will only "see" the return value, not what is printed to stdout. I guess.

Subject: Page Break in Report Generator

From: Tomas

Date: 12 Nov, 2013 15:03:07

Message: 6 of 6

"Tomas" wrote in message <l5t711$egn$1@newscl01ah.mathworks.com>...
> "Ben " <bhager@cirrusdesign.com> wrote in message <gt9l5t$ci4$1@fred.mathworks.com>...
> > Hello,
> >
> > I am writing a program to publish data to a pdf report. I am looking for a way to have a page break inserted during a loop in report generator. Is this possible?
> >
> > Thanks,
> >
> > ->Ben
>
> Hi,
> Late answer but anyway I found this question as well as several similar when I tried to find out how to force the report generator to insert a page brake. No answers so at last I tried to insert this in a text segment in a paragraph:
>
> %<sprintf('\L')>
>
> It seems to work for my need at least. I think the trick is sprintf instead of fprintf as at least the %< > will only "see" the return value, not what is printed to stdout. I guess.

A comment: sprintf('\L') generates warnings in Matlab:

  Warning: Escape sequence '\L' is not valid. See 'help sprintf' for valid escape sequences.

but in the report generator there is no warning and it works (for me, generating .pdf).

On the other side, help sprintf suggests \f for form feed. Tried it, no warning in Matlab (and no form feed in the command window) but gives a warning "Not valid XML escape ..." and no page break in the report generator. Very consistent.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us