function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Money Care 7Money Care 7 

How to display image in vf page from attachment.

Hi

I have created a page which should capture all details and generate a pdf.everything is ok but i need to dispaly image in my pdf page uisng vf page.how its possible.

User-added image
 
<apex:page sidebar="false" showHeader="false" renderAs="PDF" standardController="TigerTuesday__c" >
<html xmlns='http://www.w3.org/1999/xhtml'>
  <head>               
                <style type="text/css" media="print">
                    </style>

<apex:stylesheet value="{!$Resource.PDFDocumentStyle}" />
</head>

<c:pdfheaderfooter type="header" position="center">
       

               <img  src="{!$Resource.TigerTuesdayLogo}" ></img> 
  
          </c:pdfheaderfooter>
          
          
          <c:pdfheaderfooter type="footer" position="right" showPageNumbers="true">
    <table width="100%" border="0" >
    
    <tr>
         <td> 
         <img width="200%" height="100%" alt="logo" src="{!$Resource.TigerTuesdayLogo}" ></img>
    </td> 
    </tr>
    </table>
    
    </c:pdfheaderfooter>
    
     <table>
   <apex:outputPanel rendered="{!IF(TigerTuesday__c.Issue__c==null,false,true)}">
   <tr> 
   <td><b>Issue </b></td> <td>:{!TigerTuesday__c.Issue__c}&nbsp;<b>|</b>&nbsp;{!TigerTuesday__c.Issue_Date__c} </td>
  </tr>
 
  </apex:outputPanel>
  </table>  
  
  <table >
   <apex:outputPanel rendered="{!IF(TigerTuesday__c.Name==null,false,true)}" >
   <tr> 
   <td style="font-size:25px;font-family:rebuchet MS,Arial,Helvetica,sans-serif;color:Orange;">{!TigerTuesday__c.Name}</td>
  </tr>
 
  </apex:outputPanel>
  </table> 
  
  
  <table >
   <apex:outputPanel rendered="{!IF(TigerTuesday__c.Paragraph__c==null,false,true)}" >
   <tr> 
   <td >{!TigerTuesday__c.Paragraph__c}</td>
  </tr>
 
  </apex:outputPanel>
  </table> 







</html>
</apex:page>

 
Virendra ChouhanVirendra Chouhan
Hello,

You can use  <apex:Image> tag like :
<apex:image url="{!$Resource.TigerTuesdayLogo}" width="265" height="65"/>

 
Jasveer SinghJasveer Singh
Hi Care 7
Go to documents and open the save file and further click on view file and copy the url like below and paste in visualforce page

https://mobilytejs-dev-ed--c.ap2.content.force.com/servlet/servlet.FileDownload?file=01528000001uEUf
 
if solve your problem
mark solved

Thanks & Regards
Jasveer Singh