How to setup an header printed on every page
<?
/* * Aprint test module */
require_once(
'./aprint.php'
);
// Class setup. I set the title for the job
$p
=new aprint
("test_3",
"aprint_test3.php-1.2.0");
// Margins setup: top, bottom, and left
$p->
SetMargin(
2880,
1400,
1200);
// Open the connection to the printer. It is required to create the // fonts
$p->
OpenPrinter
(); // Create the font to use for the header. // Two fonts: one big, one normal
$fnt1=
$p->
CreateFont(
"Arial",
720,
360,
800);
$fnt2=
$p->
CreateFont(
"Arial",
360,
180,
400);
/* Now setup the header. * First array, the header is made by 3 rows, * Second array the font to use foe each row. * I want use the big font for the first and third row. */
$p->
SetPageHeader(array(
"This is a simple"
,
"text used to test",
"the header"), array($fnt1,
$fnt2,$fnt1
)
// different font foe each row
); // Draw some text
for($i
=0
;$i<
50;$i
++) $p
->Text
("row:".$i
);
// $p->Text("iiiii iiii"); // $p->Text("mmmmm mmmm"); // Close the page $p
->run
(); ?>
|