[PHP] Printer Functions

2004-04-05 Thread Lou Apolonia
My question involves sending html to the printer to be printed properly.
Here is my code:

$handle = printer_open('Lexmark Z25-Z35'); printer_start_doc($handle,
test); printer_start_page($handle);

printer_set_option($handle, PRINTER_MODE, 'raw');
printer_set_option($handle, PRINTER_PAPER_FORMAT,
PRINTER_FORMAT_LETTER); $file =
file_get_contents('http://localhost/'.$page.'.php?mid='.$mid);
printer_draw_text($handle, $file, 10, 10);

printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);

When this code runs, a page prints .. However all that prints is the
html source, and it only prints one line across the top of the page and
nothing else.  How does one send html to the printer and have the
rendered page print?

I've also tried using printer_write instead of printer_draw_text, but to
no avail.  

As always, any help is greatly appreciated.

Thank you in advance,
Lou

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Printer functions

2004-03-31 Thread Lou Apolonia
My question involves sending html to the printer to be printed properly.
Here is my code:

$handle = printer_open('Lexmark Z25-Z35');
printer_start_doc($handle, test);
printer_start_page($handle);

printer_set_option($handle, PRINTER_MODE, 'raw');
printer_set_option($handle, PRINTER_PAPER_FORMAT,
PRINTER_FORMAT_LETTER);
$file = file_get_contents('http://localhost/'.$page.'.php?mid='.$mid);
printer_draw_text($handle, $file, 10, 10);

printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);

When this code runs, a page prints .. However all that prints is the
html source, and it only prints one line across the top of the page and
nothing else.  How does one send html to the printer and have the
rendered page print?

I've also tried using printer_write instead of printer_draw_text, but to
no avail.  

As always, any help is greatly appreciated.

Thank you in advance,
Lou

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Printing landscape

2004-03-15 Thread Lou Apolonia
Is there a function/parameter that tells the printer to print in
landscape?  I believe I've searched through the Printer Functions and
haven't encountered such a thing.

Any help is appreciated.

L

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php