Jump to content

Recommended Posts

Hi,

i have this problem.

I want to use the printer_write function.

everywhere i see this :

$handle = printer_open(?????);

printer_write($handle, "Text to print");

printer_close($handle);

?>

and at the ????? you put your printer.

 

Because i'm making a page that i want the when the user wants to print some variables i want to use something so that it will start the printing at the default printer of every user. Not one only specified.

 

Any ideas?

Thank you in advance

Link to comment
https://forums.phpfreaks.com/topic/140539-solved-printer_write-problem/
Share on other sites

as dennismonsewicz points out, you can use JavaScripts

window.print();

which will bring up the printer dialog box. there is no way (with a webpage) to FORCE the users printer to start doing something...that would be a huge security violation

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.