php.de

Zurück   php.de > Webentwicklung > PHP Einsteiger > PHP Tipps 2004

 
 
LinkBack Themen-Optionen Thema bewerten
Alt 28.09.2004, 13:39  
Gast
 
Beiträge: n/a
Standard Printer-Functions in PHP

Ich versuche bei einem Projekt nach der Abspeicherung in eine MySQL-Datenbank eine Bestätigung auszudrucken.

Code:
<?php
$handle = printer_open("\\\Client03\Brother");
printer_write($handle, "Text to print");
printer_close($handle);
?>
Wenn ich diesen Code ausführe erhalte ich eine weisse Seite im Browser (keine Fehlermeldung) aber ausgedruckt wird nichts...

Wo könnte das Problem sein?


Code:
<?php
$handle = printer_open("\\\Client03\Brother");
printer_start_doc($handle, "My Document");
printer_start_page($handle);

$font = printer_create_font("Arial", 72, 48, 400, false, false, false, 0);
printer_select_font($handle, $font);
printer_draw_text($handle, "test", 10, 10);
printer_delete_font($font);

printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
?>
Beim vorhergehenden Code-Beispiel erhalte ich folgende Fehlermeldungen:

Warning: printer_start_doc(): couldn't allocate new print job in d:\www\stockmanagement\print.php on line 4

Warning: printer_start_page(): couldn't start a new page in d:\www\stockmanagement\print.php on line 5

Warning: printer_end_page(): couldn't end the page in d:\www\stockmanagement\print.php on line 12


Danke für mögliche Lösungsansätze!

grz
röne
 
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

Alt 28.09.2004, 13:55  
Gast
 
Beiträge: n/a
Standard

Lass dir die Drucker mal anzeigen:
http://de3.php.net/manual/de/function.printer-list.php

Und Versuchs mit escapten Backslashes "\\\\xxx\\Drucker"
 
Alt 28.09.2004, 14:47  
Gast
 
Beiträge: n/a
Standard

Code:
<?php
var_dump(printer_list(PRINTER_ENUM_LOCAL | PRINTER_ENUM_SHARED));
?>
gibt folgendes aus:

array(0) { }


2 Drucker sind im Netzwerk geshared und auch installiert am Server...
 
 


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Ausführing von functions in function fatsurfer PHP Tipps 2008 4 12.06.2008 13:21
functions problem PrisonerOfDreams PHP Tipps 2008 5 17.05.2008 09:41
[Erledigt] Autoloading Functions?? PHP-Fortgeschrittene 21 25.10.2005 12:25
Functions problem... PHP Tipps 2005-2 1 24.06.2005 16:40
Printer friendly version of a page with PHP CSS PHP Tipps 2005 7 05.03.2005 20:59
variable als functions namen benutzen PHP-Fortgeschrittene 9 13.02.2005 04:22
functions PHP Tipps 2005 4 11.02.2005 20:17
Location String in printer friendly Seite mitgeben PHP Tipps 2004-2 14 09.12.2004 17:27
groß-, kleinschreibungs-problem bei login Datenbanken 8 27.10.2004 23:16
Sessions und Functions PHP Tipps 2004 3 21.08.2004 10:38
functions PHP Tipps 2004 9 09.06.2004 15:18

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
\printer_start_doc\ allocate, php warning: printer_start_doc(): couldn\'t allocate new print job, printer_start_page($handle);, php printer_list, php printer functions, php warning: printer_start_doc() couldn\'t allocate new print job, beispiel printer_write, printer_start_doc(): couldn\'t allocate new print job, php browser drucker, couldn\'t allocate new print job, couldn\'t allocate new print job php, printer_start_doc() couldn\'t allocate new print job in, warning: printer_start_doc(): couldn\'t allocate new print job, php couldn\'t allocate new print job

Alle Zeitangaben in WEZ +2. Es ist jetzt 04:11 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.