Active
Project:
Webform2PDF
Version:
7.x-3.0
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Dec 2010 at 07:34 UTC
Updated:
3 Apr 2015 at 10:20 UTC
Jump to comment: Most recent
When trying to add an image to a PDF render, it doesn't appear to work. In that it wont replace the feild (%image) with the actual image.
Comments
Comment #1
mdinamar commentedIt would be great to have support for images. Maybe with hooks could be?. Cheers
Comment #2
BD3 commentedHas anyone had success with this? I would like to see this as well.
Comment #3
salientknight commentedNot only does this not include attached images, but there is no way to get the image from the submitted data field. I tried adding the field name, but still cannot even get the data.Is there an easy way to do this or a reason why these fields data wont show up?
OK so after some digging I see that the only thing stored in the data field for a file, is a link to the fid that stores it. I'll have a solution to this shortly.
Thanks!
Comment #4
salientknight commentedOK I got images working. You way want to add another filter based on mime type to exclude files that are no images but here is my solution...
first have to add a case path for file to get the token to show up in the list of tokens
on line 248:
case 'file':Then get the file path from files table
On line 420 I added
The last step is to wrap the returned value in an image tag. To get this to work for me, I had to use the fully qualified path
<img src="http://www.mywebsite.org/%please_attach_a_photo" />When I next loaded my pdfs the images were attached.
I hope this helps....
Comment #5
tusshar.kant commentedSir salientknight , will please tell me which file to edit???????
Comment #6
jinx_ven commentedHi salientknight. Can u say which file want to edit?????? in drupal 7
Comment #7
rabindrakumar commentedHi Folks,
Do anyone have any solution for this ,I have the same issue .Please suggest .
Thanks
Comment #8
rabindrakumar commentedIt gives output as image url only and not replaced with image in PDF . When I use
tag with src as url ,the image is not displayed.