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

Source for file psprint_test1.php

Documentation is available at psprint_test1.php

  1. <?
  2. /*
  3. * Psprint test module
  4. * $Header: d:\cvs/classistd/aprint/psprint_test1.php,v 1.2 2005/02/13 20:29:29 Darvin Exp $
  5. */
  6. require_once('aprint.php');
  7. require_once('psprint.php');
  8.  
  9. $p=new PSPrint("test_1","psprint_test1.php-1.1.5");
  10. // Set the page size and orientation. This function must be called before to open the output
  11. // file
  12.  
  13. $p->SetPageSize('A4',AP_PORTRAIT);
  14. // the file to write
  15. $p->OpenFileName('test1.ps');
  16. // Paper margin
  17. $p->SetMargin(3000,100,0,100);
  18. // the title, you may omit it
  19. $p->HeaderText("test_1");
  20. // and now the text.
  21. $p->Text("Left text");
  22. $p->Text("Center text",-1,AP_CENTER);
  23. $p->Text("Right text",-1,AP_RIGHT);
  24. // Set my own font ...
  25. $fnt=$p->CreateFont("Dustismo");
  26. //... and use it
  27. $p->Text(" Some text",$fnt);
  28. // This text use the previuos used font
  29. $p->Text("Some text");
  30. $p->Text("Some text");
  31. $fnt=$p->CreateFont("Dustismo",320,8,200,false,false,false,'900');
  32. $p->Text(" Some text",$fnt);
  33. $p->Text("Some text");
  34. $p->Text("Some text");
  35. $p->BlankRow();
  36. $p->BlankRow();
  37. $p->BlankRow();
  38. $p->BlankRow();
  39. $p->BlankRow();
  40. $p->Text("Some text 90",$fnt);
  41. // that's all!. Close the file and release it!
  42. $p->run();
  43. ?>

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