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

Source for file psprint_test3.php

Documentation is available at psprint_test3.php

  1. <?
  2. /*
  3. * Psprint test module
  4. * $Header: d:\cvs/classistd/aprint/psprint_test3.php,v 1.3 2005/02/13 21:02:40 Darvin Exp $
  5. */
  6. require_once('psprint.php');
  7. // Class setup. I set the title for the job
  8.  
  9. $p=new psprint("test_3","aprint_test3.php-1.2.0");
  10.  
  11.  
  12. $p->SetPageSize('A5',AP_PORTRAIT);
  13. $p->OpenFileName('test3.ps');
  14. // Margins setup: top, bottom, and left
  15. $p->SetMargin(100,100,1200);
  16. // Create the font to use for the header.
  17. // Two fonts: one big, one normal
  18. // $fnt1=$p->CreateFont("z003034l",720,360,800);
  19.  
  20. $fnt1=$p->CreateFont("bchr",720,360,800);
  21. $fnt2=$p->CreateFont("Dustismo",360,180,400);
  22. /* Now setup the header.
  23. * First array, the header is made by 3 rows,
  24. * Second array the font to use to each row.
  25. * I want use the big font for the first and third row.
  26. */
  27. $p->SetPageHeader(array("This is a simple",
  28. "text used to test",
  29. "the header"),
  30. array($fnt1,$fnt2,$fnt1) // different font foe each row
  31. );
  32. // Draw some text
  33. for($i=0;$i<50;$i++)
  34. $p->Text("row:".$i);
  35. // Close the page
  36. $p->run();
  37. ?>

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