This Question is Answered

1 "correct" answer available (5 pts) 15 "helpful" answers available (3 pts)
2 Replies Last post: Mar 24, 2008 5:45 AM by markecho

About page-setup-dialog procedure

Mar 23, 2008 7:52 PM

Click to view markecho's profile Level 2 markecho 35 posts since
Oct 17, 2007

How could I set up a page for printing by calling page-setup-dialog procedure,


After I call the page-setup-dialog procedure,

I click the "print set up(P...)" button,

the dialog with printer choice is shown,

I mean I wanna open the dialog above directly by calling page-setup-dialog procedure,

how should I do?

Thanks for your reply.

Click to view Kamal's profile Curl Kamal 139 posts since
Oct 17, 2007
1. Re: About page-setup-dialog procedure Mar 24, 2008 5:34 AM

You cannot open the Printer choices dialogs directly from the page setup dialog. If you could explain me the reason why you want to do this, maybe I will be able to help you with an alternative. By the way, this Dialog is provided by the OS (when one is available for an OS like MAC and Win32) and hence one will never know what capabilities it may have. So depending on the layout or capabilities of it is never a good idea.

In any case, kindly note that there are some useful APIs in Printer that might help you:

Printer.get-printers, Printer.get-current-printer, Printer.get-default-printer, Printer.get-page-description, Printer.get-page-setup-margin, etc

You could use them to write your custom print/page-setup dialog. Also note that in 6.0 the "print-graphic" API is now extended to take the printer-name, page-description etc. So you can directly feed this information from you custom dialog, when you call the print-graphic API.

Hope this helps.


Click to view markecho's profile Level 2 markecho 35 posts since
Oct 17, 2007
2. Re: About page-setup-dialog procedure Mar 24, 2008 5:45 AM
in response to: Kamal

much thanks to you,Kamal,

anyway, It's helpful for me.