Re: [PHP] printer_draw_text

2002-08-17 Thread robert mischke



> 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?
> 

printer_draw_text($handle, "+", 100, $y);
$y=+$fontsize; 
printer_draw_text($handle, "+", 100, $y);

robert


> 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
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




[PHP] printer_draw_text

2002-08-12 Thread Peter Bottenberg

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




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