Home General

Save printerSetup

edited April 2011 in General
Hello,

I know I can save the printer specific settings using

ppReport1.PrinterSetup.SaveDeviceSettingsToFile
and
ppReport1.PrinterSetup.LoadDeviceSettingsFromFile.


But I'm wondering how to save the default printer settings from the
ppReport1.Printer.ShowSetupDialog?


Thank you very much,
greets ben

Comments

  • edited April 2011
    Report.PrinterSetup.EditDeviceSettings can be used to display the printer's
    built-in Properties dialog and then call SaveDeviceSettings afterwords to
    save to file or stream.

    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited April 2011
    Hi,

    yes I know - but I don't want to save the save the settings of the
    printer's built-in Properties dialog, I want to save the settings of the
    standard printer dialog (which is shown when you call
    ppReport1.Printer.ShowSetupDialog).

    Thanks!


    Am 11.04.2011 21:15, schrieb Nard Moseley (Digital Metaphors):
  • edited April 2011

    Try creating a TppPrinter object and using it as shown below.

    var
    lPrinter: TppPrinter;
    begin

    lPrinter := TppPrinter.Create;

    try

    lPrinter.PrinterSetup := ppReport1.PrinterSetup;

    lPrinter.ShowSetupDialog;

    ppReport1.PrinterSetup := lPrinter.PrinterSetup;

    ppReport1.PrinterSetup.SaveDeviceSettingsToStream(myStream);

    finally

    lPrinter.Free;

    end;

    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited April 2011
    Hello Nard,

    thank you very much - your solution works fine!


    Am 12.04.2011 21:19, schrieb Nard Moseley (Digital Metaphors):
This discussion has been closed.