Page 1 of 1

PrintTicket parameter in PrintWithWpf ignored

Posted: Fri Sep 10, 2010 3:52 pm
by leadlayer
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.

PrintTicket parameter in PrintWithWpf ignored

Posted: Mon Sep 13, 2010 8:47 am
by Alex K.
Hello,

We need some time for fix this problem. We will let you know when the solution is available.

Thank you.

PrintTicket parameter in PrintWithWpf ignored

Posted: Tue Sep 14, 2010 1:30 pm
by leadlayer
Thank you for your attention. I have a project which is in need of the solution, so any intermediate solutions or suggestions that arise during the course of finding the primary solution would be most welcome.

PrintTicket parameter in PrintWithWpf ignored

Posted: Wed Sep 15, 2010 4:18 am
by Ivan
Hello,
leadlayer wrote: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: ...
The settings are ignored, evidenced by the printer output (one per page in portrait orientation).
We have checked our code, it works correctly.

Perhaps you are experiencing one of the common problems: if some property in the PrintTicket is set incorrectly, some printer drivers ignore this facility entirely and use the print settings by default.
Tell us what your printer model is and show the code that you use for printing. We will try to test it.
leadlayer wrote: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.
That was the idea of this matter. The Stimulsoft.Report.StiReport class is used both in Reports.Net (.Net 2.0) and Reports.Wpf (.Net 3.5), so we cannot add a reference to ReachFramework.dll (.Net 3.5) and pass this parameter as object.

Thank you.