phpDocumentor Aprint
[ Back ] [ class tree: Aprint ] [ index: Aprint ] [ all elements ]

Source for file aprint_test3.php

Documentation is available at aprint_test3.php

  1. <?
  2. /*
  3. * Aprint test module
  4. */
  5. require_once('./aprint.php');
  6. // Class setup. I set the title for the job
  7.  
  8. $p=new aprint("test_3","aprint_test3.php-1.2.0");
  9. // Margins setup: top, bottom, and left
  10. $p->SetMargin(2880,1400,1200);
  11. // Open the connection to the printer. It is required to create the
  12. // fonts
  13.  
  14. $p->OpenPrinter();
  15. // Create the font to use for the header.
  16. // Two fonts: one big, one normal
  17.  
  18. $fnt1=$p->CreateFont("Arial",720,360,800);
  19. $fnt2=$p->CreateFont("Arial",360,180,400);
  20. /* Now setup the header.
  21. * First array, the header is made by 3 rows,
  22. * Second array the font to use foe each row.
  23. * I want use the big font for the first and third row.
  24. */
  25. $p->SetPageHeader(array("This is a simple",
  26. "text used to test",
  27. "the header"),
  28. array($fnt1,$fnt2,$fnt1) // different font foe each row
  29. );
  30. // Draw some text
  31. for($i=0;$i<50;$i++)
  32. $p->Text("row:".$i);
  33.  
  34. // $p->Text("iiiii iiii");
  35. // $p->Text("mmmmm mmmm");
  36. // Close the page
  37.  
  38. $p->run();
  39. ?>

Documentation generated on Sun, 13 Feb 2005 22:02:54 +0100 by phpDocumentor 1.3.0RC3