By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,824 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

Printing

P: n/a
Is it possible to print to a printer using PHP.
I was thinking of developing an application using PHP and printing reports
will be one of the requirements.

Thanks in advance
Jul 17 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
On Mon, 18 Oct 2004 02:45:21 GMT, mickeyg <me**********@yahoo.com>
wrote:
Is it possible to print to a printer using PHP.
I was thinking of developing an application using PHP and printing reports
will be one of the requirements.

Thanks in advance


I was looking for the same thing... ended up just going with
javascript print() function.

--
ryan
Jul 17 '05 #2

P: n/a
In article <57Gcd.4700$B34.3987@trndny02>, mickeyg wrote:
Is it possible to print to a printer using PHP.
I was thinking of developing an application using PHP and printing reports
will be one of the requirements.


Depends on the OS you are using, http://www.php.net/printer

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://www.timvw.info>
Jul 17 '05 #3

P: n/a
mickeyg wrote:
Is it possible to print to a printer using PHP.
I was thinking of developing an application using PHP and printing reports
will be one of the requirements.

Thanks in advance

Have a look at http://www.fpdf.org as a possible option if you need to
accurately lay out your page, and printing from the browser isn't good
enough.

Basically, you create a PDF file which the user then prints. Recent
versions of Acrobat reader can execute javascript to open the print
dialog, too.

Ed
Jul 17 '05 #4

P: n/a
user wrote:
On Mon, 18 Oct 2004 02:45:21 GMT, mickeyg <me**********@yahoo.com>
wrote:
Is it possible to print to a printer using PHP.
I was thinking of developing an application using PHP and printing
reports will be one of the requirements.

Thanks in advance


I was looking for the same thing... ended up just going with
javascript print() function.


Which is perfectly correct, as the printer is connected to the client, and
not to the server. Javascript is client side, PHP is server side.

--
Markus
Jul 17 '05 #5

P: n/a
In article <41***********************@news.easynet.ch>,
"Markus Ernst" <derernst@NO#SP#AMgmx.ch> wrote:
user wrote:
On Mon, 18 Oct 2004 02:45:21 GMT, mickeyg <me**********@yahoo.com>
wrote:
Is it possible to print to a printer using PHP.
I was thinking of developing an application using PHP and printing
reports will be one of the requirements.

Thanks in advance


I was looking for the same thing... ended up just going with
javascript print() function.


Which is perfectly correct, as the printer is connected to the client, and
not to the server. Javascript is client side, PHP is server side.


My Javascript book says Internet Explorer doesn't support window.print.
How do you get around this?

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 17 '05 #6

P: n/a
Ed Jones wrote:
Have a look at http://www.fpdf.org as a possible option if you need to
accurately lay out your page, and printing from the browser isn't good
enough.

Basically, you create a PDF file which the user then prints. Recent
versions of Acrobat reader can execute javascript to open the print
dialog, too.

Ed


I just stumbled across FPDF a couple of weeks ago when needing to create
documents from php for an internal project.

Absolutely brilliant software! Takes a bit to get your head around, but
follow the examples, look at a few of the addon scripts and you're away.

I can see me using this in lots of places :-)

Sacs
Jul 17 '05 #7

P: n/a
On Mon, 18 Oct 2004 13:00:33 -0700, "Michael Vilain
<vi****@spamcop.net>" wrote:
In article <41***********************@news.easynet.ch>,
"Markus Ernst" <derernst@NO#SP#AMgmx.ch> wrote:
user wrote:
> On Mon, 18 Oct 2004 02:45:21 GMT, mickeyg <me**********@yahoo.com>
> wrote:
>
>> Is it possible to print to a printer using PHP.
>> I was thinking of developing an application using PHP and printing
>> reports will be one of the requirements.
>>
>> Thanks in advance
>
> I was looking for the same thing... ended up just going with
> javascript print() function.


Which is perfectly correct, as the printer is connected to the client, and
not to the server. Javascript is client side, PHP is server side.


My Javascript book says Internet Explorer doesn't support window.print.
How do you get around this?


i just called javascript:print();
works in mozilla and IE.
Jul 17 '05 #8

P: n/a
In article <9b********************************@4ax.com>,
user <us**@in.ternet> wrote:
On Mon, 18 Oct 2004 13:00:33 -0700, "Michael Vilain
<vi****@spamcop.net>" wrote:
In article <41***********************@news.easynet.ch>,
"Markus Ernst" <derernst@NO#SP#AMgmx.ch> wrote:
user wrote:
> On Mon, 18 Oct 2004 02:45:21 GMT, mickeyg <me**********@yahoo.com>
> wrote:
>
>> Is it possible to print to a printer using PHP.
>> I was thinking of developing an application using PHP and printing
>> reports will be one of the requirements.
>>
>> Thanks in advance
>
> I was looking for the same thing... ended up just going with
> javascript print() function.

Which is perfectly correct, as the printer is connected to the client, and
not to the server. Javascript is client side, PHP is server side.


My Javascript book says Internet Explorer doesn't support window.print.
How do you get around this?


i just called javascript:print();
works in mozilla and IE.


On the Macintosh version of IE, window.print and print don't work. What
version and OS are you using where they do?

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 17 '05 #9

P: n/a
Michael Vilain <vi****@spamcop.net wrote:

My Javascript book says Internet Explorer doesn't support
window.print. How do you get around this?


AFAIK it is only IE 5 on Macintosh that does not support window.print().
With IE 5 and 6 on PC I never encountered problems. I don't think the Mac IE
5 community is very large, as there are better products available for recent
Macs (Safari, Firefox), and the Mac OS 9 community is (what a pity!) still
quite stuck to Netscape 4.x.

--
Markus
Jul 17 '05 #10

P: n/a
Michael Vilain <vi****@spamcop.net wrote:
On the Macintosh version of IE, window.print and print don't work.
What version and OS are you using where they do?


Mac IE and Windows IE are totally different softwares, developed by
different teams, the only thing they have common is the name and the
company. The print function does not work on Mac IE, and it does on Win IE.

--
Markus
Jul 17 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.