Page 1 of 1

Specific margins for the 1st page only (not other pages)

Posted: Thu Oct 30, 2014 8:53 am
by sylvainl
Hi,

I use a TScaleRichViewEdit (v6), with header+footer for the 1st page (PageProperty.TitlePage := True).
I would like to have specific margins for my 1st page (differents than other pages margins), programmatically.
I couldn't find how to do that, couldn't found any property (setmargins for Page 1 only)

Any idea ?

Example of what I want to do...
[Page 1]
Margins (left, top, right, bottom): 10mm 20mm 20mm 20mm
Header specific : text header 1st page
Footer specific : text footer 1st page

[Page 2,....n]
Margins (left, top, right, bottom): 10mm 15mm 10mm 15mm
Header normal : text header
Footer normal : text footer


The only idea I had was : because I have a 1st page header specific, maybe I can write in it (addtexnla, addnla , ... in SubDocuments[srvhftFirstPageHeader]) until I have the height I need for my page 1 top-margin (= header 1st page Height, in my case)... but could manage how to check the height :(


Thanks in advance for your help, guys.

++
SylvainL

Posted: Thu Oct 30, 2014 10:17 am
by Sergey Tkachenko
Sorry, it is not supported yet.
It requires implementations of sections of documents (parts of documents having their own page settings). It is planned for future, but not very near future, sorry.

Posted: Thu Oct 30, 2014 1:36 pm
by sylvainl
Arg...
but ok, I understand.

So I will just do differently meanwhile, and just play with the SRve.SubDocuments[srvhftFirstPageHeader]
If I had some linebreak at the end, it can do the job.

But there is one problem (bug?), when I do

Code: Select all

SRve.SubDocuments[srvhftNormalHeader].AddNL('test',0,0);
SRve.SubDocuments[srvhftNormalHeader].AddNL('test',0,0);
SRve.SubDocuments[srvhftNormalHeader].AddNL('test',0,0);
I need to write

Code: Select all

SRve.ReFormat;
And the modification of header height is effective

But when I do

Code: Select all

SRve.SubDocuments[srvhftFirstPageHeader].AddNL('test',0,0);
SRve.SubDocuments[srvhftFirstPageHeader].AddNL('test',0,0);
SRve.SubDocuments[srvhftFirstPageHeader].AddNL('test',0,0);
and

Code: Select all

SRve.ReFormat;
But nothing happen, the 1st page header height doesn't change


Thanks for your help

++
SylvainL