The PrintJob.Page.PrintOptions.PaperSource.Name is not updated after a SetPaperSourceByName(string) call. Although the page is sent to the correct tray, it would be nice to check this property during unittesting.
PaperSource.Name does not get updated
Re: PaperSource.Name does not get updated
Support · Sep 7, 2009Hello,
We will forward this information over to the developers to look into it further. We will post a message here after getting any information from them.
Thanks,
ceTe Software Support Team.
Re: PaperSource.Name does not get updated
Support · Sep 10, 2009Hello,
We did some further testing and it works perfectly fine. Below is the sample code we used:
PrintJob printJob = new PrintJob("Printer.Default", @"C:\Temp\Test.pdf");
bool temp = printJob.PrintOptions.SetPaperSourceByName(" Tray 1");
string name = printJob.PrintOptions.PaperSource.Name;
printJob.Print();
If the value returned by the SetPapersourceByName method is false, that would indicate that the PaperSource does not exist.
The name you set should match exactly as the values returned by printer.PaperSources.
Thanks,
ceTe Software Support Team
Re: PaperSource.Name does not get updated
Forum member · Sep 16, 2009Ah, ok. That would explain a lot. I used in the nightly build the Microsoft XPS Document Writer as printer and of course it does not have any papersources.