Printing to trays, DefaultPageSettings
Posted: Fri May 13, 2016 5:33 pm
Hi Stimulsoft,
we are currently trying to get a special printer (http://www.primerahealthcare.com/signat ... inter.html) work with our product. The printer has 4 Trays (Hopper #1 to #4) and a manual one. They hold plastic cassettes where tissue will be placed in.
We tried to print to the trays as we do it with laser printers - setting the RawKind-Property in the Printer Settings structure. Unfortunately, the printer does not react on that.
Therefore I did some investigation and found a code snippet for C# which sets the Paper Source in the QueryPageSettings event of the print document. When I set the paper source there, this special printer ignores the value.
Then i found out, that when setting die paper source via PrintDocument.DefaultPageSettings.PaperSource.RawKind, it works!
So my question now is - how do you set the PaperSource during StiReport.Print ? And furthermore, is there a possibility to set it via PrintDocument.DefaultPageSettings ?
To sum it up: this code does not work
this one does:
Thanks a lot for you help!
-- muehlberger
we are currently trying to get a special printer (http://www.primerahealthcare.com/signat ... inter.html) work with our product. The printer has 4 Trays (Hopper #1 to #4) and a manual one. They hold plastic cassettes where tissue will be placed in.
We tried to print to the trays as we do it with laser printers - setting the RawKind-Property in the Printer Settings structure. Unfortunately, the printer does not react on that.
Therefore I did some investigation and found a code snippet for C# which sets the Paper Source in the QueryPageSettings event of the print document. When I set the paper source there, this special printer ignores the value.
Then i found out, that when setting die paper source via PrintDocument.DefaultPageSettings.PaperSource.RawKind, it works!
So my question now is - how do you set the PaperSource during StiReport.Print ? And furthermore, is there a possibility to set it via PrintDocument.DefaultPageSettings ?
To sum it up: this code does not work
Code: Select all
void TestPrintResultinginDefaultHopper() {
PrintDocument pd = new PrintDocument();
pd.QueryPageSettings += pd_QueryPageSettings;
pd.Print();
}
void pd_QueryPageSettings(object sender, QueryPageSettingsEventArgs e) {
// change the tray to Hopper #4 (260) at that point does not work
e.PageSettings.PaperSource.RawKind = 260;
}
Code: Select all
void TestPrintResultinginHopper_4() {
PrintDocument pd = new PrintDocument();
// changing the tray to Hopper #4 (260) at that point does work
pd.DefaultPageSettings.PaperSource.RawKind = 260;
pd.Print();
}
Thanks a lot for you help!
-- muehlberger