Re: setPrintJobProperty problem
- Posted by Andy Drummond <andy at kest?el?ele.com> Oct 30, 2007
- 690 views
Bernie Ryan wrote: > > > Andy and Judith: > > Using win98; if you goto the control panel. > > Right click on the installed printer. > > Select properties and on the property dialog select paper. > > There is a radio button that selects if the default paper orientation > > is landscape or portrait. > > If you change it you will find that whatever this is set to > > will be what the printer is defaulting to in page setup. > > So it looks like the only way to change it by page setup box. > > Bernie > Bernie, the point is NOT to merely select the default orientation for a printer, but to be able to make it print in whichever orientation I want under program control rather than under manual intervention control. If I use the getPefaultPrinter() call, then setPrinterJobPriority() to set the orientation to landscape - i.e. different from the default orientation - then print, it still prints in portrait. But if I use the pageSetup() call, THAT shows the orientation is in landscape (as requested) but hitting cancel still causes the print to be in portrait. So although the apparent orientation had been set, as shown by setPageSetup(), it wasn't changed as far as actual printing is concerned. What I want to be able to do is click a button to print to the default printer and then for the program to decide whether it wants portrait or landscape orientation according to the data to be printed. This is particularly relevant to unmanned programs which just print as required with no-one there to look at the data and decide which way round the paper ought to be. Apart from which, it should be possible, even fairly straightforward, to be able to make things do what you want in Windows. In reality it is an absolute pain - as colored buttons turned out to be. Why on Earth can't you simply set the color of a button in Windows? Why must it be BTNFACE for all buttons? Same for printing - I need to print to the default printer (and later to be able to choose the printer under software control) and then print to it the way I want. I don't like being forced to jump through Bill Gates' hoops! Trouble is, I need wonderful prople like Judith and CChris to get around these problems, I am totally incapable of this kind of chicanery. Andy