Windows PageSetupDlg and using report printersetup
Before RB I have used a component from Brad Stowers of DFS that wrapped the
windows PageSetupDlg common dialog API function (over looked by Delphi).
This dialog enables the user to specify the attributes of a printed page
including paper size and source, the page orientation (portrait or
landscape), and the width of the page margins with a standard interface.
Now I am caught between using this and report.PrinterSetup and getting in a
mess. Ones uses TPrinter and the other TppPrinter
I realise that I can just create my own form to show the PrinterSetup fields
that are not on the Printer Dialog e.g margins, like demo #121, but since I
want to replicate the appearance of the Windows common dialog I wonder
a) has anyone already done this, and prepared to share the code?
b) is there a way to get the TdfsPageSetupDialog setting of Tprinter values
to pass to TppPrinter?
Any suggestions
Sarah
windows PageSetupDlg common dialog API function (over looked by Delphi).
This dialog enables the user to specify the attributes of a printed page
including paper size and source, the page orientation (portrait or
landscape), and the width of the page margins with a standard interface.
Now I am caught between using this and report.PrinterSetup and getting in a
mess. Ones uses TPrinter and the other TppPrinter
I realise that I can just create my own form to show the PrinterSetup fields
that are not on the Printer Dialog e.g margins, like demo #121, but since I
want to replicate the appearance of the Windows common dialog I wonder
a) has anyone already done this, and prepared to share the code?
b) is there a way to get the TdfsPageSetupDialog setting of Tprinter values
to pass to TppPrinter?
Any suggestions
Sarah
This discussion has been closed.
Comments
which is why we created TppPrinter. I am not familiar with the Tdfs dialog
and don't know what properties it provides. The TppPrinter object has a
TppPrinterSetup property which you can set.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
encapsulates the standard page setup dialog that Wordpad shows
(http://www.delphifreestuff.com if you're curious). The difficulty in
passing its properties to TppPrinterSetup is that it does not return
papername, but sets this for the printer as part of the Windows PageSetupDlg
call. So I can pass the margins and size (converting units on the way) but
end up with "Custom Size" paper.
Now a TppPrinter version of this standard but forgotten dialog would be
nice.....
Sarah