kooloveme / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
Other
0 stars 0 forks source link

NewPage Tag or Event #221

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,
Can be added the <NewPage> or <EndPage> or <BP>"Break Page" for printing 
purposes only.

or better yet event OnUserTag().

procedure Thtml.OnUserTag(psender:tobject;pusertag:string"TElement");
begin
if pusertag='newpage' and HtmlPreview.isprinting then
 begin
  HtmlPreview.BreakPage; or
  HtmlPreview.NewPage; or
  HtmlPreview.BkPage;
 end;
end;
This NewPage will force next html print to a new page.

The onusertag we can decide what to do with the unknown tag.

Thanks.

Sérgio Francisco

Original issue reported on code.google.com by sf...@hotmail.com on 4 Dec 2012 at 12:37

GoogleCodeExporter commented 9 years ago

Original comment by OrphanCat on 20 Dec 2012 at 10:45

GoogleCodeExporter commented 9 years ago
There is a tag named <page> that forces a new page when printing.
It is a HtmlViewer extension. 
Does it fit your demands?

Original comment by OrphanCat on 25 Jan 2013 at 5:23