Page 1 of 1

PrintPreView component

PostPosted: May 3rd, 2007, 2:29 pm
by beinars
Hi there!

Excuse my poor English!

I'm beginning to use this great component by Kambiz R. Khojasteh. To begin with, many many thanks to him..

Ok..

It looks like I need to use limits on pages, i.e. in some cases my apps have so many pages to print and preview that it would be just inpractical to create them all in canvas ahead, not to mention memory requirements.

So It looks like that I must build up some buffer or just offer the user to preview one page at time, that is if they exceed 10 pages limit or so.

I'm looking at this object Preview and ThumbnailPreview and can't see methodes to just clear page/s and begin next segment...

Hmmm.. am I missing something?

All the best
Beinarss

PostPosted: May 3rd, 2007, 3:34 pm
by Kambiz
  1. If you set the UseTempFile property to True, you can have more pages without being worry about memory.
  2. The component can show pages created pages while creating the rest.
  3. To change content of visible pages, you may find BeginEdit and EndEdit methods usefull.

PostPosted: May 4th, 2007, 12:38 pm
by beinars
Thanks..

1) I'm pretty sure my customers wan't like to see all pages of heavy lists in tumbnails and tabs, even if I can. We are talking about couple hundred pages in some lists!

2) Time is not the biggest issue.

3) Ok.. thats what I need.

Among other things I tryed..

Code: Select all
WITH PrintPreview DO
BEGIN
    BeginEdit(2);
    Pages[2].Clear;
    EndEdit;
END;



But.. nothing happends. Any ideas?

PostPosted: May 4th, 2007, 3:44 pm
by Kambiz
function BeginEdit(PageNo: Integer): Boolean;
Intializes Canvas to edit an existing page.


Code: Select all
with PrintPreview do
begin
  BeginEdit(2);
  try
    Canvas.Brush.Style := bsSolid;
    Canvas.Brush.Color := clWhite;
    Canvas.FillRect(PageBounds);
  finally
    EndEdit;
  end;
end;

PostPosted: May 4th, 2007, 5:15 pm
by beinars
LOL

Ok.. I will use this!

//edit by J_B : Quoting whole posts is BadThing[tm]