Hello.
What is the best way to export RichViewEdit content with header/footer (in additional TRichViewEdit components) to the html-file? I want to obtain the same look of the html document, as I can see this one in print/preview actions.
Thanks.
Save header/footer in html
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
You are right. The ideal solution can be to "draw" document to the "html-canvas", as TReportHelper does with casual canvas, but it seems to be very difficult in implementation, so I try to find an easiest way. A minimal goal is to have header/footer inserted in explicit page breaks places of the document.
-
- Posts: 15
- Joined: Mon May 07, 2012 5:14 pm
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
As I understand, <header> and <footer> in HTML5 are not page header/footer, but something like a top and a bottom part of the site containing menus, logos, etc. They are designed to help search engines to find the main content of HTML page.
The code for inserting a header may be:
The code for inserting a header may be:
Code: Select all
// header is in Stream
for i := rv.ItemCout-1 downto 0 do
if (i=0) or (rv.PageBreaksBeforeItems[i]) then begin
rv.PageBreaksBeforeItems[i] := 0;
Stream.Position := 0;
rv.InsertRVFFromStream(Stream, i);
end;