This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Page width

pvledoux wrote on 2010-11-24:
Hi Guys,

strange problem here. I have a HTML page starting with a img tag and a table. The img width is 400 and table is 100%. When I generate the PDF, the table has the width of the img???
If I set 1200 to the img, then it is ok, the table take 100% of the page.
I tried to remove the img tag. Setting the table to 100% or 1200px does not make any differences, the table width is compressed, it does not take 100% of the page.
I really don't see how a img width just above a table can determine the table width? Does the PDF requires an initial object which determines the page width?

Well, ok, I did a img with a 1200px, but it's a bite annoying (I'm a purist... ;) ).

Cheers,

Pv
support wrote on 2010-11-24:
Hi,

The following code should correspond to what you have described: a 400x100 image followed by a table having width of 100%:

<html>
  <body>
    <img src="" width="400" height="100">
    <table width="100%" style="border: 1px solid black">
      <tr>
        <td>table</td>
      </tr>
    </table>
  </body>
</html>


The resulting PDF looks ok, you can test it at http://pdfcrowd.com/#convert_by_input

Please, could you post your html code that does not work so we can look into it? Thanks.