1

If we have, for example, multiple DIV elements each one surrounded by a NOBREAK tag, the second element in every page will be shifted to the right.
Now: http://i54.tinypic.com/9az8ya.png
After the patch: http://i52.tinypic.com/vxp5jq.png

To fix this, you have to insert the line "$this->_makeBreakLine(0);" inside the "_tag_open_NOBREAK($param)" function of the file "html2pdf.class.php":
[...]
        protected function _tag_open_NOBREAK($param)
        {
            if ($this->_isForOneLine) return false;

            $this->_maxH = 0;  
            $this->_makeBreakLine(0); // **** This is the line you have to insert ****

            // create a sub HTML2PDF to execute the content of the tag, to get the dimensions
            $sub = null;
[...]


Let me know if it's helpful!

Bye!

2

Patch now included in the html2pdf fork:
https://github.com/danieleds/html2pdf_fork