Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

HTML Table column widths incorrect after PDF conversion

$
0
0
Hi,

I have an HTML table that has columns with correct width before being converted by the Aspose PDF converter, but after conversion, the widths look wrong.

See attached screenshots showing the table before and after conversion.

The HTML and CSS describing the table is below.  It looks like Aspose is doing something funny with the width and/or white-space attributes in the css class.

Any ideas what's going wrong here?

Thanks


    .sizetofit {
        width:1%;
        white-space:nowrap;
    }



   <table style="border: 1px solid #000000; font-size: 8px; text-align: center; vertical-align: middle; white-space: nowrap; width: 100%">
        <tr style="border: 1px solid #000000; padding-bottom: 25px;">
            <th colspan="11">
                <span style="font-size: 18.0pt">
                    Heading</span>
            </th>
        </tr>
        <tr>
            <td class="sizetofit">Field 1</td>
            <td class="sizetofit">Field 2</td>
            <td class="sizetofit">Field 3</td>
            <td class="sizetofit">Field 4</td>
            <td class="sizetofit">Field 5</td>
            <td class="sizetofit">Field 6</td>
            <td class="sizetofit">Field 7</td>
            <td>Comments</td>
        </tr>

        <tr>
            <td class="sizetofit">asd</td>
            <td class="sizetofit">afasfsafsfsdfsdfsfd</td>
            <td class="sizetofit">fd sdf s sd</td>
            <td class="sizetofit">sdfs sfs fsdfs fsdfsdf sdf</td>
            <td class="sizetofit">sfsdf </td>
            <td class="sizetofit">sdfsdfdfsfdfdfd</td>
            <td class="sizetofit">dd</td>
            <td>Comments comments comments comments</td>
        </tr>


Viewing all articles
Browse latest Browse all 3131

Trending Articles