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
SANDEEP PARIHARSANDEEP PARIHAR 

How to display Attachment Body in Visualforce Page.

Hi,
I am getting a response from service which is generating an image as an attachment in related list.This image is a Label of shipment package.
My motive is to display this service response in visualforce page in pdf format.On clicking of detail button.Screenshot of Label

Thank You!
Rajiv Penagonda 12Rajiv Penagonda 12
If your attachment is being saved as image, you may try using <apex:image> tag in your VF page that is rendered as pdf. You may use the below code in your VF page:
 
<apex:image value="{!URLFOR($Action.Attachment.Download, yourAttachment.id)}" />