Skip to main content

I have my printer_redirection value = true in my app.config file under Tunables.  Is there an option that I can set in this same place that will open up the windows printer dialog.  Right now, my file is going straight to the printer without allowing me to change options such as printing landscape or whatever is available for my printer dialog.

I have my printer_redirection value = true in my app.config file under Tunables.  Is there an option that I can set in this same place that will open up the windows printer dialog.  Right now, my file is going straight to the printer without allowing me to change options such as printing landscape or whatever is available for my printer dialog.

If you use PC_PRINTER_REDIRECTION_PROC you can set an entry point that will be called when the printer is opened. That will allow you to change printing options, though I don't think that there is an option to display the print dialog.

I have my printer_redirection value = true in my app.config file under Tunables.  Is there an option that I can set in this same place that will open up the windows printer dialog.  Right now, my file is going straight to the printer without allowing me to change options such as printing landscape or whatever is available for my printer dialog.

You can display a print dialog to select the printer name and set its properties by using PC_PRINTER_SET_DEFAULT but you have to do this prior to the OPEN on your printer. By using default-option=2 it will display a printer browse dialog and allow you to select a printer and set its properties. You can then use default-option=1 and call PC_PRINTER_SET_DEFAULT again and the selected printer will be the new default.

Then when you open your printer using the OPEN statement it should open the selected printer using the options that you selected.

An alternative is to print your file to disk first using a name and then use PC_PRINT_FILE to send it to the printer as PC_PRINT_FILE also allows you to use a print dialog.

I have my printer_redirection value = true in my app.config file under Tunables.  Is there an option that I can set in this same place that will open up the windows printer dialog.  Right now, my file is going straight to the printer without allowing me to change options such as printing landscape or whatever is available for my printer dialog.

Can this be set in the app.config file under tunables..
<add key="printer_defaults" value="2" /> or some other way?

I have my printer_redirection value = true in my app.config file under Tunables.  Is there an option that I can set in this same place that will open up the windows printer dialog.  Right now, my file is going straight to the printer without allowing me to change options such as printing landscape or whatever is available for my printer dialog.

I just tested my last suggestion and although the changed properties are used in the printing when run under native code, they do not appear to be in effect when run under managed code when using PC_PRINTER_SET_DEFAULT. The selected printer is used but the changed properties are being ignored.

PC_PRINT_FILE should still work for both though.

I have my printer_redirection value = true in my app.config file under Tunables.  Is there an option that I can set in this same place that will open up the windows printer dialog.  Right now, my file is going straight to the printer without allowing me to change options such as printing landscape or whatever is available for my printer dialog.

Is there a good example somewhere on using printer properties and the call statements associated with them?

I have my printer_redirection value = true in my app.config file under Tunables.  Is there an option that I can set in this same place that will open up the windows printer dialog.  Right now, my file is going straight to the printer without allowing me to change options such as printing landscape or whatever is available for my printer dialog.

Is there a good example somewhere on using printer properties and the call statements associated with them?

I have my printer_redirection value = true in my app.config file under Tunables.  Is there an option that I can set in this same place that will open up the windows printer dialog.  Right now, my file is going straight to the printer without allowing me to change options such as printing landscape or whatever is available for my printer dialog.

Is there a good example somewhere on using printer properties and the call statements associated with them?