Hi all.
I have two printers in system, in one (default) size of papers is A4, in second width of paper is 80 mm.
I need to print the document on the second printer.
If I open the preview, the paper size A4 is displayed there.
How to change the target printer on the preview?
Preview, default pinter and two printers in system
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Preview, default pinter and two printers in system
TRichView uses setting of the current printer.
You can change printer by assigning Printer.PrinterIndex, where Printer is defined in the Printers unit.
You can change printer by assigning Printer.PrinterIndex, where Printer is defined in the Printers unit.
Re: Preview, default pinter and two printers in system
Серега, извини, вчера с пивом перебор вышел.
Дай код, пожалуйста.
Дай код, пожалуйста.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Preview, default pinter and two printers in system
What code do you need?
uses Printers;
...
Printer.PrinterIndex := 0; // switching to printer having the name Printer.Printers[0]
...
Printer.PrinterIndex := 1; // switching to printer having the name Printer.Printers[1]
If preview is already displayed, you need to call RVPrint.FormatPages after changing PrinterIndex.
uses Printers;
...
Printer.PrinterIndex := 0; // switching to printer having the name Printer.Printers[0]
...
Printer.PrinterIndex := 1; // switching to printer having the name Printer.Printers[1]
If preview is already displayed, you need to call RVPrint.FormatPages after changing PrinterIndex.