Re: setPrintJobProperty problem
- Posted by Bernie Ryan <xotron at ?luefrog.co?> Oct 30, 2007
- 592 views
Andy Drummond wrote: > > > 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: Why can't you just install two different printers in the CONTROL PANEL using the SAME printer. Call one my_portrait_printer and the other my_landscape_printer. Then setup each for the defaults that you want. Then you can decide which orientation you need and send it to the correct installed printer. Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan