<?php include "./Yaps.inc.php"; $yps = new Yapser(); $yps->Open(""); $yps->BeginPage(595, 842); $yps->SetLineWidth(20); $yps->SetDash("", 0); $yps->SetLineCap(2); $yps->SetLineJoin(1); $yps->SetColor(1, 0, 0); $yps->Line(0, 0, 500, 800); $yps->SetLineWidth(10); $yps->Rectangle(200, 100, 100, 50); $yps->SetLineWidth(1); $yps->Circle(200, 700, 100); $yps->Disc(200, 700, 50); $yps->Arc(200, 700, 75, 10, 80); $yps->SetColor(0, 0, 1); $yps->SetLineWidth(10); $yps->Pie(200, 700, 40, 10, 80); $yps->FullPie(200, 700, 25, 110, 180); $yps->SetColor(0.5, 0.5, 1); $yps->Bar(100, 400, 200, 50); $yps->SetColor(0.5, 0.5, 1); $yps->SetFont("Courier-Bold", 14); $yps->SetLineWidth(1); $yps->Translate(300, 700); $yps->Rotate(10); $yps->ShowAt("Ciuffy", 0, 0); $yps->Rotate(-10);
<?php include "./Yaps.inc.php"; $yps = new Yapser(); $yps->Open(""); // Create temporary file in the YTMP_DIR directory (see Yaps.inc.php file) $yps->BeginPage(595, 842); // Uncomment these lines to insert images //$yps->ShowImage("/www/htdocs/www/pro/pdfreports/interakt.jpg",0,842); //$yps->ShowImage("/www/htdocs/www/pro/pdfreports/yaps.jpg",100,780); $yps->SetFont("Helvetica", 8); $yps->SetColor(0.5, 0.5, 0.5); $yps->SetLineWidth(0.5); $text = "This is an example, showing the capabilities of ShowBoxed function.\nThe only caracter accepted as word-wrapping separator is the space character \" and the EOL character \""; $yps->SetColor(0.7, 0, 0); $yps->SetAlign("left"); $yps->SetUnderline("true"); $yps->Rectangle(10, 700, 200, -95); $yps->ShowBoxed($text, 10, 700, 200, 95); $yps->SetColor(0.7, 0.7, 0); $yps->SetAlign("center"); $yps->SetUnderline("false"); $yps->Rectangle(230, 720, 130, -135); $yps->ShowBoxed($text, 230, 720, 130, 135); $yps->SetColor(0, 0, 0.7); $yps->SetAlign("right"); $yps->SetUnderline("true"); $yps->Rectangle(380, 700, 200, -95); $yps->ShowBoxed($text, 380, 700, 200, 95); $yps->EndPage(); $yps->Close();