printer

This is a discussion on "printer" within the PHP Forum section. This forum, and the thread "printer are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 2nd, 2007, 00:49
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
printer

Has anyone been able to succesfully get the printer functions to work?
I can't
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote

  #2 (permalink)  
Old Oct 2nd, 2007, 06:17
c010depunkk's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: printer

From php.net:
Quote:
These functions are only available under Windows 9.x, ME, NT4 and 2000. They have been added in PHP 4.0.4.
Installation

This » PECL extension is not bundled with PHP.
Windows users must enable php_printer.dll inside of php.ini in order to use these functions. Unbundled PECL extensions may be downloaded from: » http://pecl4win.php.net/
Runtime Configuration

The behaviour of these functions is affected by settings in php.ini.
have you installed the package and adjusted the settings?
Reply With Quote
  #3 (permalink)  
Old Oct 2nd, 2007, 06:31
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: printer

I think so.
I've added the dll to the extension list and it's in the folder
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #4 (permalink)  
Old Oct 2nd, 2007, 06:43
c010depunkk's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: printer

PECL extensions? php.ini settings? Are you running Windows 9.x, ME, NT4 or 2000?
Reply With Quote
  #5 (permalink)  
Old Oct 2nd, 2007, 06:48
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: printer

I have the extension DLL in my extension folder,
I have added extension=php_printer.dll to php.ini,
and I'm on windows server 2003 using a network printer.
I probably should of mentioned this before, i get this error:
Quote:
Fatal error: Out of memory (allocated 262144) (tried to allocate 4294967295 bytes) in C:\Web\Blog\admin\uploads\printtest.php on line 3
And I had one before saying
Quote:
couldn't allocate the printerjob
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #6 (permalink)  
Old Oct 2nd, 2007, 07:59
c010depunkk's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: printer

code?
Reply With Quote
  #7 (permalink)  
Old Oct 2nd, 2007, 08:04
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: printer

I can't remember,
i'm at school now, but it was like the one on the php manual.
or could you recommend a code that would probably work?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #8 (permalink)  
Old Oct 2nd, 2007, 08:11
c010depunkk's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: printer

hmmm. no, sry.

Couldn't find anything useful on google either.
Reply With Quote
  #9 (permalink)  
Old Oct 2nd, 2007, 15:13
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: printer

here it is:
PHP: Select all

<?php
$handle 
printer_open("\\\\Experience\\hp"); 
if (
printer_write($handle"Text to print") == false) {
echo 
"Didn't work";
} else {
printer_close($handle);
echo 
"closed";
}
?>
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #10 (permalink)  
Old Oct 2nd, 2007, 15:37
c010depunkk's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: printer

I've been trying this at home for about half-an-hour now and I just can't get it to work! I'll get back to you if I have any success....
Reply With Quote
  #11 (permalink)  
Old Oct 2nd, 2007, 16:01
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: printer

thanks! I just think if this can work it will be really useful
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #12 (permalink)  
Old Oct 10th, 2007, 14:48
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: printer

Any news on this?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #13 (permalink)  
Old Oct 10th, 2007, 15:29
c010depunkk's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: printer

nope, sorry. Haven't had any luck.
Reply With Quote
  #14 (permalink)  
Old Oct 10th, 2007, 16:17
simonb's Avatar
Blog Moderator

Join Date: Dec 2006
Location: Norwich
Posts: 677
Blog Entries: 4
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to simonb
Re: printer

What does printer do?
Last Blog Entry: Whats your Niche? (Jun 10th, 2008)
Reply With Quote
  #15 (permalink)  
Old Oct 10th, 2007, 16:19
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: printer

Quote:
Originally Posted by simonb View Post
What does printer do?
Print things
It's an ext extension that is supposed to print copies of pages on the server.
I haven't been able to get it working.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #16 (permalink)  
Old Oct 10th, 2007, 16:40
simonb's Avatar
Blog Moderator

Join Date: Dec 2006
Location: Norwich
Posts: 677
Blog Entries: 4
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to simonb
Re: printer

Ok thanks Rep for you. I am only on 27 yeah

Ps how is the uploader going
Last Blog Entry: Whats your Niche? (Jun 10th, 2008)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] PHP Printer-Friendly Page Stuart PHP Forum 35 Oct 17th, 2007 23:47
[SOLVED] Javascript Printer-Friendly Page &quot;Creator&quot; Stuart JavaScript Forum 33 Oct 13th, 2007 13:06
printer-friendly web page marisol Web Page Design 4 Sep 28th, 2006 21:12


All times are GMT. The time now is 05:47.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43