DELPHI AREA
MESSAGE BOARD
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   Watched TopicsWatched Topics     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Printpreview.LoadFromFile extra page

 
Post new topic   Reply to topic   printer-friendly view    DELPHI AREA Forum Index -> DELPHI AREA's Products
View previous topic :: View next topic  
Author Message
Tom Rage
Member


Joined: 21 Feb 2004
Posts: 8
Location: Belgium

PostPosted: 15/12/06 12:36    Post subject: Printpreview.LoadFromFile extra page Reply with quote

Hi,

After printing -and saving- a single page document, I recall and reprint the document, see code below. There is a small difference...a second, blank page is printed. The preview also shows the empty page. Should I refresh/clear something before/after LoadFromFile?

Thanks,
Tom.

PrintPreview.BeginDoc;
PrintPreview.LoadFromFile(AFileName);
PrintPreview.PrintJobTitle := ExtractFileName(AFileName);
PrintPreview.EndDoc;
if AutoStartPrint then
begin
if PrintPreview.State = psReady then PrintPreview.Print
...
Back to top
View user's profile Send private message Visit poster's website
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 1069
Location: Tehran, Iran

PostPosted: 16/12/06 04:34    Post subject: Reply with quote

Just strip the BeginDoc and EndDoc lines.

PrintPreview.LoadFromFile(AFileName);
PrintPreview.PrintJobTitle := ExtractFileName(AFileName);
if AutoStartPrint then
begin
PrintPreview.Print;
...

_________________
Kambiz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tom Rage
Member


Joined: 21 Feb 2004
Posts: 8
Location: Belgium

PostPosted: 16/12/06 11:19    Post subject: Reply with quote

Thanks.

Tom.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    DELPHI AREA Forum Index -> DELPHI AREA's Products All times are GMT
Page 1 of 1

Add to favorites

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group