I need to display an image on the PDF, which will depend on characteristics of the view, but am currently unable to do so. What I have is below - the text "Look here!" prints well, but the image never does.

Should this be working, or is there an alternative way to include images in the PDF?

if($variable==1) {
print "Look here! <img src='http://www.mysite.com/redbox.JPG'>";
} else {
print "Look here! <img src='http://www.mysite.com/bluebox.JPG'>";


maxplus’s picture

Version: 6.x-1.0 » 7.x-1.x-dev


I'm using version 7 of Views PDF and the only way I managed to display an image is to use another PDF as background template.
Images from fields from some content are also not appearing on my viewsPDF generated PDF...

Does anybody know how to display a image field on the viewsPDF generated PDF?

hessam61’s picture

You can just add an image field to your views, and set the formatter to image, and Views PDF should be able to render it as HTML on PDF.

HeathN’s picture

I am doing a webform view and can't add image fields, why can this not render HTML image tags and display them? Is this a bug?

killua99’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs steps to reproduce

Dear fellow Drupal enthusiasts,

I have set this issue to "Postponed (Maintainer needs more information)".

If not already done please add an issue summary and steps how to reproduce the problem.
And please read again, "Making an issue report".

Help about how to do this can be found on IRC and in the user groups.

After there is new information, please re-open the issue by changing the status to active.

This issue was edited with the help of Issue Helper

Rustan’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Anyone having issues with image, this seems like the best solution.

Rustan’s picture

Issue summary: View changes

slight correction