| View previous topic :: View next topic |
| Author |
Message |
Tom Rage Member
Joined: 21 Feb 2004 Posts: 8 Location: Belgium
|
Posted: 15/12/06 12:36 Post subject: Printpreview.LoadFromFile extra page |
|
|
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 |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 1069 Location: Tehran, Iran
|
Posted: 16/12/06 04:34 Post subject: |
|
|
Just strip the BeginDoc and EndDoc lines.
PrintPreview.LoadFromFile(AFileName);
PrintPreview.PrintJobTitle := ExtractFileName(AFileName);
if AutoStartPrint then
begin
PrintPreview.Print;
...
_________________ Kambiz |
|
| Back to top |
|
 |
Tom Rage Member
Joined: 21 Feb 2004 Posts: 8 Location: Belgium
|
Posted: 16/12/06 11:19 Post subject: |
|
|
Thanks.
Tom.
|
|
| Back to top |
|
 |
|