set BottomMargin with Footer Height
Posted: Sat Jan 31, 2026 8:29 am
srve.PageProperty.BottomMargin :=
Hi,
How can I set srve.PageProperty.BottomMargin with footer height?
procedure ApplyFooter(Vars: array of rVarS);
cousin
i, j: Integer;
Tables: TRVTableItemInfo;
CenteredParaNo, TabbedParaNo, NormalTextNo, NormalTextNo2: Integer;
// BoldTextNo, NormalParaNo, ColoredParaNo, RightParaNo, BigBoldTextNo: Integer;
RVStyle: TRVStyle;
Cell: TRVTableCellData;
RVData: TCustomRVData;
PItem: TRVPageNumberItemInfo;
sText: string;
begin
try
for j := 1 to 2 do
begin
if j = 1 then
begin
srve.SubDocuments[srvhftFirstPageFooter].Clear;
RVData := srve.SubDocuments[srvhftFirstPageFooter].GetRVData;
RVStyle := srve.SubDocuments[srvhftFirstPageFooter].GetRVStyle;
end
else
begin
srve.SubDocuments[srvhftNormalFooter].Clear;
RVData := srve.SubDocuments[srvhftNormalFooter].GetRVData;
RVStyle := srve.SubDocuments[srvhftNormalFooter].GetRVStyle; // RVData.GetRVStyle;
end;
// creating text and paragraph styles
// NormalParaNo := GetParaStyle(RVStyle, rvaLeft);
// RightParaNo := GetParaStyle(RVStyle, rvaRight);
// ColoredParaNo := GetParaStyle(RVStyle, rvaLeft, RVStyle.PixelsToUnits(0, 1), 0, $006CD9, clBlack);
CenteredParaNo := GetParaStyle(RVStyle, rvaCenter);
TabbedParaNo := GetParaStyle(RVStyle, rvaRight);
NormalTextNo := GetTextStyle(RVStyle, 8, [], clBlack, 'Georgia');
NormalTextNo2 := NormalTextNo;
if (j = 1) then
begin
RVData.AddTextNLW('', NormalTextNo, TabbedParaNo, TabbedParaNo);
end;
// making table 1 (logo | info)
Tables := TRVTableItemInfo.CreateEx(1, 2, RVData);
Table.ParaNo := CenteredParaNo;
Table.BorderWidth := 0;
Table.Color := clNone;
Table.BestWidth := -100;
Table.Cells[0, 0].BestWidth := -60;
Table.Cells[0, 1].BestWidth := -40;
Cell := Table.Cells[0, 1];
Cell.Clear;
Cell.VAlign := rvcTop;
Cell.AddTextNLW('Bank of Enterprising People', NormalTextNo, TabbedParaNo, TabbedParaNo);
Cell := Table.Cells[0, 0];
Cell.Clear;
TabbedParaNo := GetParaStyle(RVStyle, rvaLeft, 0, RVStyle.PixelsToUnits(0, 100));
for i := Low(Vars) to High(Vars) do
begin
sText := i.ToString+') '+ Vars.Value;
NormalTextNo := GetTextStyle(RVStyle, 8, GetStyle(sText), clBlack, 'Georgia');
Cell.AddTextNLW(sText, NormalTextNo, TabbedParaNo, TabbedParaNo);
end;
RVData.AddItem('', Table);
PItem := TRVPageNumberItemInfo.Create(RVData);
PItem.NumberType := rvpntDecimal;
PItem.ParaNo := CenteredParaNo;
PItem.TextStyleNo := NormalTextNo2;
RVData.AddItem('', PItem);
end;
serve.PageProperty.FooterY := 0.8;
srve.PageProperty.BottomMargin :=srve.RVFooter.Height ; //3.5;
serve.PageProperty.UpdatePageSize;
serve.RVFooter.Change;
if serve.RichViewEdit.Modified then
serve.RichViewEdit.Format;
Hi,
How can I set srve.PageProperty.BottomMargin with footer height?
procedure ApplyFooter(Vars: array of rVarS);
cousin
i, j: Integer;
Tables: TRVTableItemInfo;
CenteredParaNo, TabbedParaNo, NormalTextNo, NormalTextNo2: Integer;
// BoldTextNo, NormalParaNo, ColoredParaNo, RightParaNo, BigBoldTextNo: Integer;
RVStyle: TRVStyle;
Cell: TRVTableCellData;
RVData: TCustomRVData;
PItem: TRVPageNumberItemInfo;
sText: string;
begin
try
for j := 1 to 2 do
begin
if j = 1 then
begin
srve.SubDocuments[srvhftFirstPageFooter].Clear;
RVData := srve.SubDocuments[srvhftFirstPageFooter].GetRVData;
RVStyle := srve.SubDocuments[srvhftFirstPageFooter].GetRVStyle;
end
else
begin
srve.SubDocuments[srvhftNormalFooter].Clear;
RVData := srve.SubDocuments[srvhftNormalFooter].GetRVData;
RVStyle := srve.SubDocuments[srvhftNormalFooter].GetRVStyle; // RVData.GetRVStyle;
end;
// creating text and paragraph styles
// NormalParaNo := GetParaStyle(RVStyle, rvaLeft);
// RightParaNo := GetParaStyle(RVStyle, rvaRight);
// ColoredParaNo := GetParaStyle(RVStyle, rvaLeft, RVStyle.PixelsToUnits(0, 1), 0, $006CD9, clBlack);
CenteredParaNo := GetParaStyle(RVStyle, rvaCenter);
TabbedParaNo := GetParaStyle(RVStyle, rvaRight);
NormalTextNo := GetTextStyle(RVStyle, 8, [], clBlack, 'Georgia');
NormalTextNo2 := NormalTextNo;
if (j = 1) then
begin
RVData.AddTextNLW('', NormalTextNo, TabbedParaNo, TabbedParaNo);
end;
// making table 1 (logo | info)
Tables := TRVTableItemInfo.CreateEx(1, 2, RVData);
Table.ParaNo := CenteredParaNo;
Table.BorderWidth := 0;
Table.Color := clNone;
Table.BestWidth := -100;
Table.Cells[0, 0].BestWidth := -60;
Table.Cells[0, 1].BestWidth := -40;
Cell := Table.Cells[0, 1];
Cell.Clear;
Cell.VAlign := rvcTop;
Cell.AddTextNLW('Bank of Enterprising People', NormalTextNo, TabbedParaNo, TabbedParaNo);
Cell := Table.Cells[0, 0];
Cell.Clear;
TabbedParaNo := GetParaStyle(RVStyle, rvaLeft, 0, RVStyle.PixelsToUnits(0, 100));
for i := Low(Vars) to High(Vars) do
begin
sText := i.ToString+') '+ Vars.Value;
NormalTextNo := GetTextStyle(RVStyle, 8, GetStyle(sText), clBlack, 'Georgia');
Cell.AddTextNLW(sText, NormalTextNo, TabbedParaNo, TabbedParaNo);
end;
RVData.AddItem('', Table);
PItem := TRVPageNumberItemInfo.Create(RVData);
PItem.NumberType := rvpntDecimal;
PItem.ParaNo := CenteredParaNo;
PItem.TextStyleNo := NormalTextNo2;
RVData.AddItem('', PItem);
end;
serve.PageProperty.FooterY := 0.8;
srve.PageProperty.BottomMargin :=srve.RVFooter.Height ; //3.5;
serve.PageProperty.UpdatePageSize;
serve.RVFooter.Change;
if serve.RichViewEdit.Modified then
serve.RichViewEdit.Format;