This project is read-only.

Way to specify location of a table?

Apr 26, 2013 at 1:29 AM
Is there a way to move a table to a particular location on the page? I tried the following:

$styleTable = array('borderSize'=>6, 'left'=>3000, 'top'=>3000, 'borderColor'=>'006699', 'cellMargin'=>80);

It didn't change anything. I'm trying to place text at a specific location on the page, like writing to pdf docs allows you to do. I was planning on using a 1 cell table if it worked.

What I'd really like is a TextBox field. If it's not available and someone could give me some ideas on where to start, I could maybe hack one in if it's not too complex. The one complexity seems to be in the fact that it needs to be embedded in a drawing area, so you'd need a drawing area object as well.

Apr 29, 2013 at 10:33 PM
I tested a bit of positioning code. This is for a hard coded position, but it's easy enough to make the positions variables. It's inside _writeTable inside Base.php.
2419 and 1239 are 1.68 inches and .86 inches, so the multiplier at least in my doc seems to be about 1440 to convert from inches. I still want to add a TextBox field.
                if(!empty($tblStyle)) {
                            $objWriter->writeAttribute('w:val', $tblStyle);