php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18412 PRINTER_ORIENTATION
Submitted: 2002-07-18 09:15 UTC Modified: 2003-04-25 11:56 UTC
Votes:15
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: shad at volny dot cz
New email:
PHP Version: OS:

 

 [2002-07-18 09:15 UTC] shad at volny dot 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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.

Regards.
 [2002-08-26 02:09 UTC] tanes73 at hotmail dot com
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
 [2002-12-19 23:17 UTC] iliaa@php.net
Appears to be an abandoned PECL extension.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 14:01:29 2024 UTC