PrintPreView component

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

PrintPreView component

Postby beinars » May 3rd, 2007, 2:29 pm

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
beinars
Active Member
Active Member
 
Posts: 12
Joined: May 3rd, 2007, 9:38 am
Location: Iceland

Postby Kambiz » May 3rd, 2007, 3:34 pm

  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.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby beinars » May 4th, 2007, 12:38 pm

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?
beinars
Active Member
Active Member
 
Posts: 12
Joined: May 3rd, 2007, 9:38 am
Location: Iceland

Postby Kambiz » May 4th, 2007, 3:44 pm

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;
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby beinars » May 4th, 2007, 5:15 pm

LOL

Ok.. I will use this!

//edit by J_B : Quoting whole posts is BadThing[tm]
beinars
Active Member
Active Member
 
Posts: 12
Joined: May 3rd, 2007, 9:38 am
Location: Iceland


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 4 guests

cron