Link to home
Start Free TrialLog in
Avatar of edhasted
edhastedFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Delphi 5 - How to Send a FORM FEED Command

I am using Delphi 5 (still) and just finishing off an application.
It would be REALLY useful if I could click on a button to send a Form Feed to the default printer.

Can someone tell me what the correct lines to insert are?
The rest of the reports are, suprisingly, generated by QReports :-).

With thanks,

Ed
Avatar of bernani
bernani
Flag of Belgium image

Avatar of edhasted

ASKER

With the formfeed.dpr function I was uncertain how to imbed it into my program and then call it - exuse my naievity.

With the Torry example what happens if it's not LPT1? Is it possible to get it to send to the defualt printer?

Ed
ASKER CERTIFIED SOLUTION
Avatar of quilley
quilley

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Where does Printer. come from?

Delphi generates unidentfied Identifer when I try this.

There doesn't appear to be a Printer. drop in or am I missing something fundametnal.

Yours,

Ed
Sorted, put the Printers unit and and prefixed the syntax so it reads:

begin
  Printers.Printer.BeginDoc;
  Printers.Printer.EndDoc;
end;

This is universally simple - sends to the defaul printer and wonderfully short.

This is the quickest and most efficient of the solution provided.

With many thanks,

Ed Hasted