1

I would like to get the URL from an image to display in a page that is going to be rendered as .doc. My problem is that while PDF is easy to render, just setting the renderAs attribute on the page, Word documents are a little bit trickier.

In my document, I need to display several images and attach to it so the user can download. I already achieved the part of generating a document and downloading it, but when I open the document with an image, the image displayed is broken and has the name of the file's URL, like this:

program used to open the file is LibreOffice

I know that this works when using a link that contains the file's extension (adding an image from Imgur, for example, works). Is there a way to get a similar URL from Salesforce?

  • Are you trying to export image documents from Salesforce org, is that correct? They are stored as base64 encoded data in the table – once you download it on to machine, you can easily decode it with echo encodeddata | base64 --decode > filename.png – wintermute Sep 20 '16 at 0:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.