Skip to main content

How do I get the width and height of a doc generated with FPDF



How can I get height and width of a document in FPDF.





For example, I've next line:







$this->Cell(200,5,'ATHLETIC DE COLOMBIA S.A.',1,1,'C',1);







But, I want to do something like:







// $x = width of page

$this->Cell($x,5,'ATHLETIC DE COLOMBIA S.A.',1,1,'C',1);




Comments

  1. As far as I remember you can't do it with vanilla FPDF. You can either extend it to have a method that would return this value for you, or just store the width as a public property of fpdf object.

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?