PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: word-wrap: break-word doesn't seem to work for tables
   PostPosted: 27 Jul 2010, 15:33 
Hi,

I have the following code and I am trying to get the long word in the table to wrap so that it doesn't overflow from the pdf.

Wrapping in the table works if one uses table-layout: fixed, but pd4ml doesn't support this so in the pdf the end result is overflow.

Is there some other way to get the text in the table to wrap?

<html>
<head>
<style type="text/css">

table,td
{
word-wrap: break-word;
table-layout: fixed;
}

</style>
</head>

<body>

<table width="100%" border="1">
<tr>
<th>Title1</th>
<th>Title2</th>
</tr>
<tr>
<td>short</td> <td>LongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWordLongWord</td>
</tr>
</table>

</body>

</html>


  Subject: Re: word-wrap: break-word doesn't seem to work for tables
   PostPosted: 28 Jul 2010, 00:32 
I used your sample HTML code and got a correct result. See attached.

Which verion of PD4ML do you use?


Attachments:
pd4ml22282.pdf [41.07 KiB]
Downloaded 100 times
  Subject: Re: word-wrap: break-word doesn't seem to work for tables
   PostPosted: 28 Jul 2010, 10:58 
Thanks for the quick response.

I have version 3.6.0fx1.

Now that I see that you got it to work I looked into my problem again more closely. It turns out the application wasn't using the css word-wrap in the pdf because the plcase where I put it wasn't included to the html the pdf was made out of.

I moved the word-wrap definition and got it to work. I also discovered that pd4ml doesn't require the property table-layout:fixed, this is only needed to make the tables wrap in the browser view.

Thanks for the support!



[Reply]     [ 3 posts ] 

Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share