I'm attempting to add my company logo to a visual force page, which is then being rendered as a pdf, but have not been successful

Logo.zip is a static ressource images.jpg is the logo within the zip file

    <P ALIGN="RIGHT" STYLE="margin-bottom: 0.45in; line-height: 100%">
        <apex:image url="{!URLFOR($Resource.Logo,'images.jpg')}"  WIDTH="113" HEIGHT="65" />

Any idea?

  • 1
    I usually use something like <img src="{!URLFOR($Resource.Logo,'images.jpg')}" WIDTH="113" HEIGHT="65" /> and have this working in pdf docs. Could it be a problem with your <P> style? Apr 17, 2014 at 9:20
  • I put it outside <P> style, No change!
    – LoveLace
    Apr 17, 2014 at 9:24
  • 1
    Did you check the image url carefully? if it's just one image try putting <apex:image id="logo1" url="{!$Resource.imglogo}"/> where imglogo should direclty your file.
    – highfive
    Apr 17, 2014 at 9:25
  • Yes right! that's what I've told myself too !! And yes its showing up now, thank you @highfive
    – LoveLace
    Apr 17, 2014 at 9:35
  • Yep with pleasure :)
    – LoveLace
    Apr 17, 2014 at 10:40

2 Answers 2


When using URLFOR($Resource.Logo,'images.jpg') be careful to put the correct image url. In my opinion if you have only one file, it's better to directly add a static resource to that and set the path as below.

<apex:image id="logo1" url="{!$Resource.imglogo}"/>

Here's a version I have that works for me.

<apex:page  showHeader="false" renderas="pdf" applyHtmlTag="false" standardStylesheets="false">
    size: A4 landscape;
    margin-bottom: 20px;
    margin-top: 20px;

        font-family:Arial, Helvetica, sans-serif;
        content: "Page " counter(page);
        font-size: 10pt;
        content: element(pageHeader);

    display: block;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 10pt;



<div id="pageHeader">
    <img src="{!URLFOR($Resource.Logo)}" width="100px;"/>


Does the image show up correctly in an html rendered page? change renderAs to html to check.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .