php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11884 I cant print
Submitted: 2001-07-04 14:10 UTC Modified: 2001-07-06 12:32 UTC
From: herman_diener at hotmail dot com Assigned: dbeu (profile)
Status: Closed Package: Reproducible crash
PHP Version: 4.0.4 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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: herman_diener at hotmail dot com
New email:
PHP Version: OS:

 

 [2001-07-04 14:10 UTC] herman_diener at hotmail dot com
I cant use the function printer_open, when i try that i see ?PHP  fatal error in PHP4TS.DLL of 017f:100849DA ETC ETC"

Please Help Me

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-04 14:52 UTC] derick@php.net
Are you sure you have a default printer installed?

Derick
 [2001-07-04 15:30 UTC] herman_diener at hotmail dot com
Hi Derick

yes i?am very shure of that, i am really have a default printer instaled
in this php server..

When i put a invalid name in the printer_open(X), i mean a name thats no
exists how printer in my computer. i see a warning, but if i put a valid
name how HP804C my copmuter stop PHP, please helpme Derick, i need to
use this function in my aplication.

Sorry by my english, if you know who can help me in spanish please
contactme with he.

 [2001-07-04 15:36 UTC] derick@php.net
So it works without a printername, like printer_open(); and it does not work like this: printer_open("HP Deskjet 840C"); ?

Derick
 [2001-07-05 16:17 UTC] herman_diener at hotmail dot com
Hi Derick

Yes, it not works, now i trying without a argument in the printer_open() function, and i dont see the error again, but i see the following words

Warning: couldn't allocate the printerjob in c:\archivos de programa\apache group\apache\htdocs\avances1\porfetel\impresiones.php on line 9

and my program is :

$handle = printer_open("Epson");
$HOLA="Esta es una pryueba";

printer_start_doc($handle,$HOLA,$HOLA);
printer_start_page($handle);
echo "hola";
printer_write($handle, "Text to print");
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
       
Now, how you see i configurate the php.ini whit a printer.default_printer	=  Epson

plase Helpme
 [2001-07-06 03:47 UTC] derick@php.net
I'm assigning this to you Daniel, as you are the maintainer of this extension.

Derick
 [2001-07-06 12:32 UTC] dbeu@php.net
a crash bug (i could reproduce) is be fixed in cvs.
(please also check your printer driver setup!)
you should also consider using printer_draw_text instead of printer_write (which is used for raw printer data only), see http://php.net/manual/en/function.printer-select-font.php for an example.
if you need printer_write you may need to change the datatype:
printer_set_option($handle, PRINTER_MODE, "RAW");
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 06:01:29 2025 UTC