TPrintDialog orientation and read orientation parameter

Is it possible to read from the TPrintDialogpage orientation (horizontal / vertical) selected by the user?

In the classic solution:

if PrintDialog1.Execute() then
begin
  Printer.Orientation := poLandscape //I want read this parameter from PrintDialog

  Printer.BeginDoc;
  ...
  Printer.EndDoc;
end;

I can not find the orientation in TPrintDialog.

+4
source share
1 answer

TPrintDialogdoes not provide this information. Rather, it allows the user to select a printer, print range, and number of copies.

When you show TPrintDialog, the user has the ability to set properties for his selected printer, including page orientation. Then you should read this information from the object TPrinteryou are using to print. A.

, Printer, . . , , Printer.Orientation, .

+4

Source: https://habr.com/ru/post/1653993/


All Articles