Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. <?php
  2. require('./fpdf/fpdf.php');
  3. $pdf = new FPDF();
  4. $pdf->AddPage();
  5. $pdf->SetFont('Arial','B',16);
  6.  
  7. $pdf->SetY(50);
  8. $pdf->SetX(80);
  9. $pdf->Cell(0,5,'Coordinates: X:'.$pdf->GetX().'/Y:'.$pdf->GetY(), 1);
  10.  
  11. $pdf->SetX(80);
  12. $pdf->SetY(80);
  13. $pdf->Cell(0,5,'Coordinates: X:'.$pdf->GetX().'/Y:'.$pdf->GetY(), 1);
  14.  
  15. $pdf->Output();
  16. ?>
  17.  
  18. function SetY($y)
  19. {
  20. // Set y position and reset x
  21. $this->x = $this->lMargin;
  22. if($y>=0)
  23. $this->y = $y;
  24. else
  25. $this->y = $this->h+$y;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement