Jump to content

printer_open() gives error!!!


rameshfaj

Recommended Posts

I wanted to print the data displayed within a frame/form using php's printer related functions.But i got the error message:

 

Fatal error: Call to undefined function: printer_open() in c:\program files\easyphp1-7\www\binod\print.php on line 8.

 

Actually what had happened and what might be the solution?

 

The code is shown below:

 

<?php

$handle = printer_open();

printer_start_doc($handle, "My Document");

printer_start_page($handle);

 

$font = printer_create_font("Arial", 72, 48, 400, false, false, false, 0);

printer_select_font($handle, $font);

printer_draw_text($handle, "test", 10, 10);

printer_delete_font($font);

 

printer_end_page($handle);

printer_end_doc($handle);

printer_close($handle);

?>

Link to comment
Share on other sites

Are you sure you have the printer compiled with your version of php?

 

http://us3.php.net/manual/en/function.printer-open.php

 

it states it might only be in CVS, meaning you need that compiled version of php to have that functionality.

 

http://us3.php.net/manual/en/ref.printer.php

 

and this notes you need PECL installed.

 

Link to comment
Share on other sites

  • 4 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.