Showing posts with label fix. Show all posts
Showing posts with label fix. Show all posts

Tuesday, January 4, 2011

TCPDF multipage table page break in multiline cell problem

I had a problem when I was creating PDFs from HTML with TCPDF. Tables spanning multiple pages which contained cells with multiple lines ended up page breaking in the middle of the cells and causing havoc with the automatically generated table header on the next page.

You might have seen other people having this problem:
http://sourceforge.net/projects/tcpdf/forums/forum/435311/topic/3874468.
And http://www.onemoretake.com/2009/03/27/revisited-tcpdf-variable-height-table-rows-with-multicell/ created their own class to circumvent the problem.

The fix now is as nicolaasuni says in http://sourceforge.net/projects/tcpdf/forums/forum/435311/topic/3874468?message=8669584, get the latest version of TCPDF.

Alternatively, if you can't upgrade, you can use the nobr attribute which tells TCPDF not to break in the middle of a cell or other HTML tag. Usage:
<tr nobr="true">
<td>your content here</td>
</tr>


Solution found (nicolaasuni again): http://sourceforge.net/projects/tcpdf/forums/forum/435311/topic/3457446?message=7762133

Thursday, December 30, 2010

New Firebug Autocomplete annoying with jQuery

Firebug is a great tool for web developers to debug webpages.

If you have installed the latest update from Firefox' Add-ons menu and tried to write jQuery commands into the console/command line of firebug you might have run across an annoying problem.

Firebug tries to autocomplete $, $(, $(', etc. adding $ and completing ' after the next character. Basically you have to keep hitting escape or delete to write your jQuery statement.

This problem is luckily fixed in the latest beta release. It is not available through the add-on menu in Firefox, but can be downloaded directly from the Firebug website. So head over to http://blog.getfirebug.com/2010/12/22/firebug-1-6-1b2/ and download it.

Source: http://code.google.com/p/fbug/issues/detail?id=3184.