0

I have a requirement to display attachment image in the word document, word document is generating from visual force page.

When i have created a visual force page with tag "apex:image url="/servlet/servlet.FileDownload?file={!attSigRec.Id}"/>" attachment i am querying in the constructor. Which is working as expected as i am able to see attachment image in the visual force page.

When i converted that page into word with "contentType="application/msword#GenerateProposal.doc"" the downlaoded document doesn't showing the image.

How can solve this?

Please help me on this thanks in advance.

3
  • contentType="application/msword#GenerateProposal.doc does not convert the page into Microsoft Word. It renders HTML and saves it with a .doc extension. You should be able to open the downloaded file and inspect its contents. What do you see? Are the image links accessible without an active Salesforce sessions? Are they correct?
    – David Reed
    Commented Dec 5, 2018 at 14:07
  • ok Thanks for the reply, right now i am getting braked images like with cross mark. Commented Dec 6, 2018 at 4:57
  • Can any one solve this please or needed any more explanation? Commented Dec 12, 2018 at 5:48

1 Answer 1

0

It's not possible to add attachment content directly in pdf/word generation visualforce page.

The alternative solution we created is creating a document for the attachment content and copying content from document.

In that way it is working fine.

You must log in to answer this question.

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