>> Forum
![]() ![]() |
Aug 24 2009, 03:28 PM
Post
#1
|
|
|
Member ![]() ![]() Group: Members Posts: 12 Joined: 23-July 09 Member No.: 267 |
I've been trying for a while now to find a way of being able to send text to the default printer from a miniPHP-compiled app. The php-printer.dll seems to work partially (printer_open appears to succeed) but any other print functions from this DLL cause the program to exit without warning (even printer_close) which suggests to me that printer_open is not returning a valid printer handle. I suspect this way won't work because I don't think the php_printer DLL is compatible with windows beyond 2000.
I've also tried using the winbinder commands to access the API directly to do this but with no real success. If there's an easy way to do this that I'm missing, or even a complicated way that someone could talk me through, I'd be very grateful. The project I'm currently working on is dead in the water if it can't print. Thanks in advance, Glynn. |
|
|
|
Aug 24 2009, 06:18 PM
Post
#2
|
|
|
Advanced Member ![]() ![]() ![]() Group: Root Admin Posts: 136 Joined: 1-December 07 Member No.: 5 |
There is an example that comes with WinBinder that shows how to print. You can see it here.
It looks like PHP's printing options are used in that example also, but I would recommend going over your code and checking it against the example to see if maybe you're missing some necessary part. Hope this helps. |
|
|
|
Aug 25 2009, 05:17 AM
Post
#3
|
|
|
Member ![]() ![]() Group: Members Posts: 12 Joined: 23-July 09 Member No.: 267 |
Dmytro, thanks for that, it looks useful.
I'm getting an error 'Use of undefined constant ENUM_PRINTER_LOCAL' returned from the script when I try and preview it. Looking at the reference on php.net, this seems to be a constant set by the function, so it should be defined. Not sure where to go from here. Cheers, gsnowden. |
|
|
|
Jul 19 2010, 04:43 AM
Post
#4
|
|
|
Newbie ![]() Group: Members Posts: 3 Joined: 18-July 10 Member No.: 453 |
Dmytro, thanks for that, it looks useful. I'm getting an error 'Use of undefined constant ENUM_PRINTER_LOCAL' returned from the script when I try and preview it. Looking at the reference on php.net, this seems to be a constant set by the function, so it should be defined. Not sure where to go from here. Cheers, gsnowden. Still in trouble? My php_printer.dll (at php 5.2) seem to work. I am porting on phpmini a working app (wbsagre - sagre) that has a working interface to print. I have some confusing error report in preview, but build works ... print ...and, at moment, give only an error writing a csv file for report statistic ( this part can be commented out ). Let me know if your help request is actual. |
|
|
|
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
| Lo-Fi Version | Time is now: 8th September 2010 - 11:26 PM |




Aug 24 2009, 03:28 PM



