1

Here a small test page:
---
<html><head></head><body>
<p style="text-align: center;">centered text above</p>
<table border="1">
<tr><td>Text in the table</td></tr>
</table>
</body>
</html>
---
As you can see table gets drawn starting from the center of the page and not from the left page margin. I could find where this behavour cames from exactly. I'll try to find it tomorrow.
Write me if you have any thoughts on this issue.

P.S. am I right that this forum even does not support email notifications?
P.P.S. Navigation here isn't very nice too - it resulted that I needed to input this message twice.

2

qrilka (./1) :
As you can see table gets drawn starting from the center of the page and not from the left page margin. I could find where this behavour cames from exactly. I'll try to find it tomorrow. Write me if you have any thoughts on this issue.


aoups, there was a bug in the c_P method sad

line 3210 of html2pdf.class.php, you have to replace the o_P method by :
}
				function c_P($param)
		{
			if ($this->forOneLine) return false;

			if ($this->maxH) $this->o_BR(array());
			$this->loadMargin();
			$h = $this->style->value['margin']['b']+$this->style->value['padding']['b'];
			
			$this->style->load();
			$this->style->FontSet();
			$this->makeBR($h); 
			
			return true;
	


it will correct this bug !
Ancien pseudo : lolo

3

I fixed it almost like you show here but my actual code has H1 before table. So you'll need to fix c_H1 also.
But it looks like code for H1 looks almost like the code for P so it would be better to generalize it into some generic helper method.

P.S. Localization on the forum switches frequently back to default French