Question

An image is not showing up on any browser for me. I'm pretty sure the 'problem' is I have defined the image's height in mm. I've defined other object's sizes in mm as well, and they appear to be working just fine. Why is it different for the img tag?

I defined the image's height in mm because the HTML gets converted to a PDF using this library: http://mpdf1.com/manual/

The PDF is a conversion of a HTMLpage: http://voorbeeld3.mediaconnexion.nl/generator/htmlrender/?id=2097 The image does not show on the HTMLpage, but it does in the resulting PDF: http://voorbeeld3.mediaconnexion.nl/generator/?download=2097 (this link should give you a download)

I'd like to know if there's something I can do to make the image show up in the HTML that would not change the way the image is displayed in the PDF.

This is the 'mainpage' (it's in dutch): http://voorbeeld3.mediaconnexion.nl/generator/?view=2097

Was it helpful?

Solution

If you declare the dimensions using HTML attributes, only two formats are allowed: a number without units (means pixels) or number with the percent sign. The mm unit can only be specified if you use CSS (works well).

OTHER TIPS

try this

<img src="/media/pictures/large/84_hilberink_makelaar.jpg" alt="" height="100%">

Intead of:

<img src="/media/pictures/large/84_hilberink_makelaar.jpg" alt="" height="1.8cm"/>

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top