|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Submitted: 2002-07-18 09:15 UTC Modified: 2003-04-25 11:56 UTC
Avg. Score:4.5 ± 0.9
Reproduced:13 of 13 (100.0%)
Same Version:2 (15.4%)
Same OS:5 (38.5%)
From: shad at volny dot cz Assigned:
Status: Wont fix Package: Unknown/Other Function
PHP Version: 4.2.1 OS: win98
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: shad at volny dot cz
New email:
PHP Version: OS:


 [2002-07-18 09:15 UTC] shad at volny dot cz
I use


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);



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-25 23:28 UTC] tanes73 at hotmail dot com
I have the same problem with Win2000/IIS too. There is no effect on using printer_set_option with PRINTER_ORIENTATION_LANDSCAPE.

 [2002-08-26 02:09 UTC] tanes73 at hotmail dot com

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.

Tanes Sriviroolchai
 [2002-12-19 23:17 UTC]
Appears to be an abandoned PECL extension.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 05:01:30 2024 UTC