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

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
sylvainl
Posts: 26
Joined: Thu Oct 09, 2014 10:18 am

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

Post 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
Sergey Tkachenko
Site Admin
Posts: 17554
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
sylvainl
Posts: 26
Joined: Thu Oct 09, 2014 10:18 am

Post 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
Post Reply