PrintTicket parameter in PrintWithWpf ignored
Posted: Fri Sep 10, 2010 3:52 pm
I am loading a PrintTicket with the options to print 2 pages per sheet and setting the orientation to landscape. Before setting these values, I confirm that the printer has the capability to accept these settings (checking the PrintCapabilities from the print queue of the target printer).
However, when the PrintTicket object is passed as a parameter in the method:
public void PrintWithWpf(Object printTicket, bool showPrintDialog, int fromPage, int toPage, int copies, string printerName)
The settings are ignored, evidenced by the printer output (one per page in portrait orientation).
I have noticed that in the documentation for the Print method a typed PrintTicket is listed as a parameter, though in the PrintWithWpf method, it is typed as an 'object'. I assumed that the parameter would take a PrintTicket type object based on the inference from the Print method, especially given that the parameter is named 'printTicket' in the documentation.
However, when the PrintTicket object is passed as a parameter in the method:
public void PrintWithWpf(Object printTicket, bool showPrintDialog, int fromPage, int toPage, int copies, string printerName)
The settings are ignored, evidenced by the printer output (one per page in portrait orientation).
I have noticed that in the documentation for the Print method a typed PrintTicket is listed as a parameter, though in the PrintWithWpf method, it is typed as an 'object'. I assumed that the parameter would take a PrintTicket type object based on the inference from the Print method, especially given that the parameter is named 'printTicket' in the documentation.