PHP Classes

Table border, img,

Recommend this page to a friend!

      MsDoc Generator  >  All threads  >  Table border, img,  >  (Un) Subscribe thread alerts  
Subject:Table border, img,
Summary:tables, images, behavior in diferent browsers
Messages:10
Author:Bila Codrut
Date:2006-01-30 08:52:03
Update:2006-07-24 12:48:50
 

  1. Table border, img,   Reply   Report abuse  
Picture of Bila Codrut Bila Codrut - 2006-01-30 08:52:03
Hi there,
Nice class, and seems to work fine.
However, there are some isues I'd like you to detail:
1. Is there any posibility to directly insert images into the .doc file.
I tried to do it working a litle around like so:
$doc->addParagraph("<img ...>"."any other text here");
but it behaves diferently, depending on the used browser.
In IE, it behaves correctly, but in Firefox, the opened .doc, doesn't show the image, only a place holder.
2. Any chance to change the table borders? I mean, how to generate a borderless table for instance.
3. How to change the character-set from Portuguese to Romanian?

Regards!

  2. Re: Table border, img,   Reply   Report abuse  
Picture of Max S. Ferreira Max S. Ferreira - 2006-01-30 18:21:03 - In reply to message 1 from Bila Codrut
Hi,
1. I'm working in a better form for insert images.
But, would be browser independent, because the document will be opened in Word.
Here, this form, works ok (IE, firefox):
$doc->addParagraph("<img src='http://all.path.to.image/all/imagem/name.gif'> any other text here");

2. In next release (this or next week) it will be possible.

3. In next release (this or next week) it will be possible.

Max

  3. Re: Table border, img,   Reply   Report abuse  
Picture of Bila Codrut Bila Codrut - 2006-01-31 16:20:43 - In reply to message 2 from Max S. Ferreira
...don't wanna bother you again, and distract you from working...however please keep in mind the backward compatibility.
Regards!

  4. Re: Table border, img,   Reply   Report abuse  
Picture of Max S. Ferreira Max S. Ferreira - 2006-01-31 17:43:03 - In reply to message 3 from Bila Codrut
yes, of course, up to now it is completely backward compatible

  5. Re: Table border, img,   Reply   Report abuse  
Picture of Bila Codrut Bila Codrut - 2006-02-06 15:13:06 - In reply to message 4 from Max S. Ferreira
Hi Max,
You rocks again!
However, in order to get backward compatibility, I need some help.

1. Let's supose I need to generate a table only with outside border.
In the previous version I tried to work around like so:

$doc->StartTable();
$cells =array();
$cells[] ="
<table border='0'>
<tr>
<td width='200'>ffffffffffffffff</td>
<td width='200'>gggggggggggggggg</td>
</tr>
<tr>
<td width='200'>hhhhhhhhhhhhhhhh</td>
<td width='200'>uuuuuuuuuuuuuuuu</td>
</tr>
</table>
";
$cells[] ="
<table border='0'>
<tr>
<td width='200'>aaaaaaaaaa</td>
<td width='200'>bbbbbbbbbbbb</td>
</tr>
<tr>
<td width='200'>cccccccccccc</td>
<td width='200'>dddddddddddd</td>
</tr>
</table>
";
$doc->addTableRow($colls);
........
$doc->endTable;

and the result is a table top-right-bottom-left bordered and no borders for embedded tables.
In the new version all tables are bordered.
Any chance to maintain the behavior from the previous version?

2. In the previous version if the page is browsed with IE, the doc file is viewed inside the browser and the embedded images are also shown, while in FireFox the file is opened in WinWord and only placeholders are seen for embedded images.
In the new version it's like in previous when browsed with FireFox.
How to view embedded images.
Thx

  6. Re: Table border, img,   Reply   Report abuse  
Picture of Bila Codrut Bila Codrut - 2006-03-06 07:28:19 - In reply to message 5 from Bila Codrut
Hi Max,
Please forgive my troubling you, but as embedding tables isn't allowed by your class, I tried a litle trick: into a bordered $cell to be passed to $doc->addTableRow($cells) I've put a html table having the border width="0". In the previous version it worked fine. However in the new version, the border width from the table to be generated by the class seems to be inherited in the html table, although the html table width is explicitly specified as 0. This is not suposed to hapen. Why is that? Do I miss anything?
Regards!

  7. Re: Table border, img,   Reply   Report abuse  
Picture of Max S. Ferreira Max S. Ferreira - 2006-03-06 18:11:46 - In reply to message 6 from Bila Codrut
The solution is in the use of ccs inline.

Sends me the code, then I can find the adequate solution.

  8. Re: Table border, img,   Reply   Report abuse  
Picture of Bila Codrut Bila Codrut - 2006-03-07 15:57:21 - In reply to message 7 from Max S. Ferreira
Yes, that's it...works fine now.
Regards!

  9. Re: Table border, img,   Reply   Report abuse  
Picture of Roberto Battisti Roberto Battisti - 2006-07-24 09:08:31 - In reply to message 6 from Bila Codrut
I have a similar problem: I want to center the text in te table so I've put an align="center" in the table tag. It doesn't work. Can anyone show me the solution??

Thanks

  10. Re: Table border, img,   Reply   Report abuse  
Picture of Bila Codrut Bila Codrut - 2006-07-24 12:48:50 - In reply to message 9 from Roberto Battisti
As Max said above, try the inline css...it works