Dom PDF – Images dont get displayed

13 years ago, October 14, 2011
Reading time: 1 mins

I came through this very funny case while i was developing a site which uses DOMPDF to generate PDF from html.

The problem was I was not getting the images in the PDF generated.

  • I had url_fopen ON on server.
  • I had tried all relative and absolute paths for the image.
  • Everything I could imagine.

Finally I found out that a simple CSS was not letting the image get displayed on PDF

the css was for img tag

img{display:block}

I removed the CSS and the images were there. :((

A day wasted by a single line of CSS.

Previous
Ranjana Lipi tutor
Next
Drupal 7 – Handling file uploads – allowed file extensions
© 2024 Anil Maharjan