Re: #18412 [Com]: PRINTER_ORIENTATION
| From: | Tanes Sriviroolchai | Date: | Mon, 26 Aug 2002 06:31:58 +0000 |
| Subject: | Re: #18412 [Com]: PRINTER_ORIENTATION | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-87457@lists.php.net to get a copy of this message | ||
Derick,
If you point me out where I can get latest sources in php4/ext/printer, I would love to provide a patch for this problem. I don't know why source codes of this module (printer) is not included in php distribution source code.
Regards,
Tanes Sriviroolchai
From: Derick Rethans <d.rethans@jdimedia.nl> To: tanes73@hotmail.com CC: PHP Developers Mailing List <php-dev@lists.php.net> Subject: Re: #18412 [Com]: PRINTER_ORIENTATION Date: Mon, 26 Aug 2002 08:29:17 +0200 (CEST) Hello Tanes, would it be possible for you to make a patch to this function? regards, Derick On 26 Aug 2002 tanes73@hotmail.com wrote:_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.comID: 18412 Comment by: tanes73@hotmail.com Reported By: shad@volny.cz Status: Open Bug Type: Unknown/Other FunctionOperating System: win98PHP Version: 4.2.1New Comment: SUGGESTION ========== After looking in source code (printer.c) carefully, I beleive that whatever you have set through has no effect. (I could be wrong if the source code I saw is too old. Anyway, it is the only one I can find.) The problem is that the steps of setting printing properties recommended by Microsoft are not followed. The printer_open() simply get current settings by calling DocumentProperties() with DM_OUT_BUFFER. Subsequent setting using printer_set_option() simply modifies these setting parameters in the buffer. Lacking of 2 steps in order to make setting printing options working, (1) modify resource->device->dmFields bit to indicate which parameters have been changed (2) Call DocumentProperties() with DM_OUT_BUFFER | DM_IN_BUFFER. The resource->device must be passed to the function also. I suggest modify printer_set_option() to modify resource->device->dmFields bit as well as resource->device->dmXXX and create another option parameter - PRINTER_SET_OPTION_NOW that will call DocumentProperties() with DM_OUT_BUFFER | DM_IN_BUFFER. Regards, Tanes Sriviroolchai Previous Comments: ------------------------------------------------------------------------ [2002-08-25 23:28:51] tanes73@hotmail.com I have the same problem with Win2000/IIS too. There is no effect on using printer_set_option with PRINTER_ORIENTATION_LANDSCAPE. Regards. ------------------------------------------------------------------------ [2002-07-18 09:15:39] shad@volny.cz I use printer_set_option($handle, PRINTER_ORIENTATION, PRINTER_ORIENTATION_LANDSCAPE); to set the printer option and try to print some text in landscape (value=2) but the output still shows up in portrait (value=1). (printer_get_option($handle, PRINTER_ORIENTATION ) = 2); Thanks. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18412&edit=1 ---------------------------------------------------------------------------Derick Rethans http://www.derickrethans.nl/ JDI Media Solutions http://www.jdimedia.nl/---------------------------------------------------------------------------