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
Mario Ruiz 646Mario Ruiz 646 

Google Maps Static API Image not showing properly in VF page rendered as PDF

The image is showing properly if i delete the renderAs attribute.

<apex:page  standardController="Opportunity" extensions="MapsTesController">
<img src="https://chuckanddons.com/media/wysiwyg/kitten_blog.jpg"    ></img>

    <img src="GoogleAPILink" />
</apex:page>

not even the first image is showing if i add renderAs="pdf"
Best Answer chosen by Mario Ruiz 646
Agustin BAgustin B
Hi Mario, you cant render images from urls when rendering as pdf, you have to save them as static resourcers.
Visualforce rendering as pdf has lots of considerations, please read this section:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_output_pdf_renderas.htm

If it helps please mark as correct, it may help others with the same issue

All Answers

Agustin BAgustin B
Hi Mario, you cant render images from urls when rendering as pdf, you have to save them as static resourcers.
Visualforce rendering as pdf has lots of considerations, please read this section:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_output_pdf_renderas.htm

If it helps please mark as correct, it may help others with the same issue
This was selected as the best answer
Mario Ruiz 646Mario Ruiz 646
Can i redirect an image  URL to be uploaded as a Static resource?