Hi.
Is there any way to convert any Page Break and any Section Break to Paragraph Break? I mean by using code (programatically)...
Thank you.
Regards, Riley
convert Page Break and Section Break to Paragraph Break
-
- Posts: 2
- Joined: Fri Nov 02, 2012 7:54 am
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
TRichView does not support section breaks yet.
Page breaks are already in places of paragraph breaks (or in places of line breaks inside paragraph), so all you need is removing page breaks.
1) You can simply assign RVPrint.IgnorePageBreaks = True to ignore all explicit page breaks.
2) The code for removing all page breaks:
Call:
end;
Page breaks are already in places of paragraph breaks (or in places of line breaks inside paragraph), so all you need is removing page breaks.
1) You can simply assign RVPrint.IgnorePageBreaks = True to ignore all explicit page breaks.
2) The code for removing all page breaks:
Code: Select all
procedure RemovePageBreaks(RVData: TCustomRVData);
var i, r, c: Integer;
table: TRVTableItemInfo;
begin
for i := 0 to RVData.ItemCount-1 do begin
RVData.PageBreaksBeforeItems[i] := False;
if RVData.GetItemStyle(i)=rvsTable then begin
table := TRVTableItemInfo(RVData.GetItem(i));
for r := 0 to table.RowCount-1 do begin
table.Rows[r].PageBreakBefore := False;
for c := 0 to table.ColCount-1 do
if table.Cells[r,c]<>nil then
RemovePageBreaks(table.Cells[r,c].GetRVData));
end;
end;
end;
Code: Select all
RemovePageBreaks(RichViewEdit1.RVData);
end;
-
- Posts: 2
- Joined: Fri Nov 02, 2012 7:54 am
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: