Printing trouble in LANDSCAPE Orientation
| From: | Salvador Gil | Date: | Wed, 07 Aug 2002 23:43:10 +0000 |
| Subject: | Printing trouble in LANDSCAPE Orientation | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-8044@lists.php.net to get a copy of this message | ||
Hi everybody,
I'm trying to print in Landscape Orientation, but PHP just print my
report in PORTRAIT.
I'm using: Windows NT 4.0, PHP 4.2.1 and MSSQL
the script is:
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<?php
$handle = printer_open("\\\\SRV_MEX_04\La_2_1");
printer_set_option($handle, PRINTER_ORIENTATION,
PRINTER_ORIENTATION_LANDSCAPE);
printer_set_option($handle, PRINTER_TITLE, 'Reporte Gastos');
printer_start_doc($handle, "Reporte Uno");
printer_start_page($handle);
print "Atributos Impresora:";
print printer_get_option($handle, PRINTER_ORIENTATION);
// Here showme Atributos Impresora:2
$TipoF="Times New Roman";
$font = printer_create_font($TipoF, 110, 76, PRINTER_FW_NORMAL,
false, false, false, 1);
printer_select_font($handle, $font);
$pen = printer_create_pen(PRINTER_PEN_DASHDOT, 6, "000000");
printer_select_pen($handle, $pen);
$brush = printer_create_brush(PRINTER_BRUSH_SOLID, "FFFFFF");
printer_select_brush($handle, $brush);
// many printer draw text ....like
printer_draw_text($handle, 'Datos del reporte',80,100);
printer_delete_brush($brush);
printer_delete_pen($pen);
printer_delete_font($font);
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
?>
</body>
</html>
____________