Custom Print Dialog Toolkit
While wxWidgets provides an extensive amount of classes and widgets, one area where it did not meet my needs was printing. Sure, wxWidgets contains everything needed to print, but it is designed to use the Operating System's (OS') built-in print and page setup dialogs. These dialogs were inadequate for my needs. So, I set out to create a custom dialog. I quickly discovered that wxWidgets did not provide a means to get the information necessary to build such a dialog. Functionality for simple things such as getting a list of all printers, and the page sizes supported by a printer were not available. So, I decided to create a custom print module to address this short-coming. Rather than creating a new dialog class, this toolkit provides an API to obtain the necessary information and functionality for a developer to create their own dialog class. In my opinion, this provides the greatest flexibility.
Since I know that I am not the only one who wanted to build custom print dialogs, I am releasing the code here under the licensing terms as wxWidgets. Ideally, this module would become an official part of the wxWidgets package. and then extended However, that decision is for the wxWidgets team to make.
- Provides an API to get a list of printers and identify the OS' default printer
- Provides an API to get a list of supported page sizes
- Provides an API to get the non-printable margins
- Enables custom print dialogs to use the native printer preferences dialog
- Integrates with the existing wxWidgets print system
At present this toolkit only supports Windows. It implements the features (listed above) that I personally needed for my own work. A demo application is included which shows how to use the basic features of the toolkit.
If anyone adds support for additional operating systems, wishes to extend this toolkit with additional features, or has suggestions for improvements, please contact me. I will be more than happy to merge quality improvements into the downloadable source-code archive.
- Couldn't print to printer-specific paper sizes that wxWidgets doesn't support (got a blank page). FIXED
- Initial version
Projects » wxWidgets Projects » Custom Print Dialog Toolkit