printer_draw_text

From: Date: Tue, 13 Aug 2002 07:23:09 +0000
Subject: printer_draw_text
Groups: php.general 
Request: Send a blank email to php-general+get-112273@lists.php.net to get a copy of this message
Hi All, I'm trying to print some date right out of an php file, to do this i use the printer_draw_text function. All works fine for one line, but how can i print more than one line? When i put my text in a string, and try to print the string it will print nice squares, but it will not print multiple lines. I have read the manual, but no help there. This works for one line: $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); $font = printer_create_font("Helvetica",36,24,200,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); but when i try this, it will print squares (like unknown character) $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); $font = printer_create_font("Arial",36,24,200,false,false,false,0); printer_select_font($handle, $font); $text = "Hello,\nThis will be the second line"; printer_draw_text($handle, $text, 10, 10); printer_delete_font($font); printer_end_page($handle); printer_end_doc($handle); printer_close($handle); Greetings Peter

« previous php.general (#112273) next »