php printer open,Call to undefined function printer_open()

Download the zip for your version. First try with ts. If it does not work, try nts.

Unzip and copy the php_printer.dll file. Paste here: C:\wamp\bin\php(phpyourversion)\ext . Note: (phpyourversion) will be like php5.5.12 depending on your version.

Find the loaded php.ini file. Use phpinfo or Wamp menu to find it. Look online for more help.

Paste this at the end of the file: extension=php_printer.dll

Restart server.

Create a file with the following code and test it:

$printer_name = "Your Printer Name exactly as it is"; $handle = printer_open($printer_name); printer_start_doc($handle, "My Document"); printer_start_page($handle); $font = printer_create_font("Arial", 100, 100, 400, false, false, false, 0); printer_select_font($handle, $font); printer_draw_text($handle, 'This sentence should be printed.', 100, 400); printer_delete_font($font); printer_end_page($handle); printer_end_doc($handle); printer_close($handle);

If the above does not work, try with nts version of the php_printer.dll file as mentioned in step two. remember to restart server after deleting the previous file, pasting the new file.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值