01.
<?php
02.
03.
var_dump(printer_list(PRINTER_ENUM_LOCAL));
04.
05.
$handle
= printer_open(
"HP LaserJet"
);
06.
07.
printer_start_doc(
$handle
,
"My Document"
);
08.
printer_start_page(
$handle
);
09.
$lfont
= printer_create_font(
"Arial"
, 115, 40, 700, false, false, false, 0);
10.
printer_select_font(
$handle
,
$lfont
);
11.
printer_draw_text(
$handle
,
'Print current User: '
.
$user
.
''
, 150, 2150);
12.
printer_delete_font(
$lfont
);
13.
printer_end_page(
$handle
);
14.
printer_end_doc(
$handle
);
15.
printer_close(
$handle
);
16.
17.
?>