You need to sign in to do that
Don't have an account?
DixitS
Cross is coming while showing VF page as Word document using simple <apex:detail> tag
Hello All,
I have a requirement, on button click download the detail page of record as a Word doc, I wrote the below code but when file is getting downloaded cross is coming in place of image (Owner name avatar), however, I used CSS and javascript to hide all the images from Page but it's not working . Please help. Thanks in advance
I have a requirement, on button click download the detail page of record as a Word doc, I wrote the below code but when file is getting downloaded cross is coming in place of image (Owner name avatar), however, I used CSS and javascript to hide all the images from Page but it's not working . Please help. Thanks in advance
<apex:page standardController="opportunity" contentType="application/msword#Tender_Opportunity.doc" cache="true" showHeader="false" sidebar="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false"> <html xmlns:w="urn:schemas-microsoft-com:office:word"> <head> <style> .labelCol { font-weight: bold; font-family: Calibri; width: 200px; text-align: left; } .dataCol { width: 300px; margin-right: 20px; } .col02 { width: 300px; margin-right: 20px; } a { text-decoration: none; } img[src=""] { display: none; visibility: hidden; } </style> <script> window.onload = function removeImg() { var images = document.getElementsByTagName('img'); for(var i=0; i < images.length; i++) { images[i].parentNode.removeChild(images[i]); } } </script> <base href="http://blogforce9dev-developer-edition.ap1.force.com/salesforceicons"/> </head> <body> <apex:detail subject="{!opportunity.id}" relatedList="false" title="false"/> </body> </html> </apex:page>
Thanks for your kind response But still the problem is same. After document will get downloaded if the protected view mode is enabled then crosses are visible and once we clicking on enable editing crosses will go away.
Thanks,
Shambhvi
you can see the cross in the image. Thanks