I have noticed an issue with my web page when trying to print it as a PDF. Everything displays correctly until I reach a page with images. Strangely, the images appear with the correct width but an incorrect height in the PDF preview.
The HTML code causing the problem is as follows:
<table width="100%">
<tr>
<td>
<table class="table table-striped table-bordered">
<tr>
<td width="50%" class="centerText">
<span style="font-size:small;text-align: center;">Top Depth Photo</span>
<img src="@utility.TopDepthImageUri" width="512" height="384" />
</td>
<td width="50%" class="centerText">
<span style="font-size:small;text-align: center;">Bottom Depth Photo</span>
<img src="@utility.BottomDepthUri" width="512" height="384" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table class="table table-striped table-bordered ">
<tr>
<td width="50%" class="centerText">
<span style="font-size:small;text-align: center;">Finish Photo</span>
<img src="@utility.FinishImageUri" width="512" height="384" />
</td>
<td width="50%" class="centerText">
<span style="font-size:small;text-align: center;">Area Photo</span>
<img src="@utility.AreaImageUri" width="512" height="384" />
</td>
</tr>
</table>
</td>
</tr>
</table>
Although the images appear fine on the web page, the PDF preview shows only one row from the table and the images are not scaled correctly. (The second row is pushed to the next page.)
Is there a way to precisely control the height and width of the images in this situation?