Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Page Break in Report Generator

325 views
Skip to first unread message

Ben

unread,
Apr 29, 2009, 9:37:01 AM4/29/09
to
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

Naresh Pai

unread,
Dec 7, 2010, 11:54:04 PM12/7/10
to
"Ben " <bha...@cirrusdesign.com> wrote in message <gt9l5t$ci4$1...@fred.mathworks.com>...

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

Thanks,
Naresh

Randall

unread,
Jan 12, 2011, 1:41:05 PM1/12/11
to
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.

Riley Wright

unread,
May 6, 2011, 11:49:05 AM5/6/11
to
"Naresh Pai" <np...@uark.edu> wrote in message <idn31c$pt9$1...@fred.mathworks.com>...

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?

Tomas

unread,
Nov 12, 2013, 7:30:26 AM11/12/13
to
"Ben " <bha...@cirrusdesign.com> wrote in message <gt9l5t$ci4$1...@fred.mathworks.com>...
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.

Tomas

unread,
Nov 12, 2013, 10:03:07 AM11/12/13
to
"Tomas" wrote in message <l5t711$egn$1...@newscl01ah.mathworks.com>...
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.
0 new messages