Re: setPrintJobProperty problem
- Posted by CChris <christian.cuvier at agri?ulture.go?v.fr> Nov 03, 2007
- 467 views
Andy Drummond wrote: > > > > > 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: > > <a > > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a> > > Now I hate to say it, but that is quite a sensible idea. It does mean I have > to be able to select a printer using its name, which is something I can't do > yet either, since I can't have both being "the default printer". It is worth > a coat of looking-at, as my boss says. > I'm not sure it is a nice solution because if I can't change orientation under > software control then I can't change anything else either - and I can't have > a printer setup for every variant I may want. Yes, I only want orientation > now, but it has the feeling of being an aspirin not a cure! > > Andy I got it working, without any new routine to add. In generic.exw: 1/ inside printDoc(), coment out the call to getPageSetup() and the test that follows; 2/ inside onClick_MenuPrint(), insert the line
at=setPrintJobProperty(JP_Orientation,DMORIENT_LANDSCAPE)
before calling getPrinter() And this is it. The Choose printer dialog pops up, no page setup, and text comes out in landscape layout. CChris