Can you point a Print to a Printer, using PHP?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Can you point a Print to a Printer, using PHP?

Post by simonmlewis »

I have someone who wants to be able to click a button to print directly to a Dymo printer.

I don't think it's possible, but if you know what printer you've got, is it possible to force it to select it ??

Simon
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Can you point a Print to a Printer, using PHP?

Post by califdon »

No, not from PHP.
JoeCommodore
Forum Newbie
Posts: 15
Joined: Fri Oct 01, 2010 10:16 pm

Re: Can you point a Print to a Printer, using PHP?

Post by JoeCommodore »

Two ideas:

A) You would have to have something other than a web browser clientside that can communicate to the php server and printer, like a python script or VB, whatever. PHP lives only on the server, the printer is on the client, and web browsers usually don't auto-initate printing.

B) Alternatively you can use a PDF library like FPDF to create a PDF of the label with which the client can then print - this is dependent on the cooperation of the web browser/printer driver to properly send the PDF to the printer (read: it should work, but you wont know till you try it out).
johnshilton
Forum Newbie
Posts: 1
Joined: Mon Mar 19, 2012 4:47 am

Re: Can you point a Print to a Printer, using PHP?

Post by johnshilton »

Alternative to php stuff, you can also use the classicPDF editor for this PDF work, it will make the task much easier. Do give your feedback here.
Here is the resource link:
Post Reply