problem in table width in html2pdf

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
learnerabn
Forum Commoner
Posts: 48
Joined: Wed Feb 10, 2010 12:56 am

problem in table width in html2pdf

Post by learnerabn »

Hi all,

I am using html2pdf class file to convert html output to pdf file.
my problem is the table width is changing according to the rows from the db.

i dont know why
can any one trace the problem here?

thanks in advance.
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: problem in table width in html2pdf

Post by Jade »

You need to set a fixed width on your table -- but even then that won't 100% guarantee the width. If you have a long string of text with no spaces to break it apart it will force the table cell to be larger even with your fixed width.
learnerabn
Forum Commoner
Posts: 48
Joined: Wed Feb 10, 2010 12:56 am

Re: problem in table width in html2pdf

Post by learnerabn »

Thanks for your reply.

No other ways to go?
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: problem in table width in html2pdf

Post by Jade »

Sure... don't write so many rows per line, or force your data to have a space (or truncate) after a certain number of characters.
Post Reply