After searching around the web for about half an hour i've decided to ask for some help. Currently i'm using this code:
procedure TViewSalesActivity.btnPrintClick(Sender: TObject);
begin
with TPrintDialog.Create(nil) do
ViewSalesActivity.PrintScale:= 1.5
try
if Execute then
ViewSalesActivity.Print;
finally
Free;
end;
end;
To print a whole form. The form includes buttons, text, captions and edit boxes etc.
The only problem is that the printout is to scale of the computer window; which is way too small. It is also stuck in the top left hand corner of the page. Is there any way to make it fill a whole page/ majority of the page?
Assuming which the ViewSalesActivity
variable is a TForm descendant, try setting the PrintScale
property to poPrintToFit
ViewSalesActivity.PrintScale:=poPrintToFit;
ViewSalesActivity.Print;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With