• Surender M
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi,

I am not able to find a solution to preview Doc,PDF,TXT,RTF,etc files in Sites of Salesforce.
I tried below major scenarios to preview

1) When Iframe is used with url of "/servlet/servlet.FileDownload?file={!contact.AVTRRT__Resume_Attachment_Id__c}" as below, it is previewing 30KB pdf properly where as for 46KB pdf, it is not preview rather it is downloading.
Why is it happening like this? it is a limitation with url of "/servlet/servlet.FileDownload?file={!contact.AVTRRT__Resume_Attachment_Id__c}"?

code:
<iframe  src="/servlet/servlet.FileDownload?file={!contact.AVTRRT__Resume_Attachment_Id__c}" ></iframe>


2) When used with <embed> tag as below for preview in Sites of Salesforce, it is giving error as "Page Not Found: /ex/errorduringprocessing.jsp" where as same <embed> tag used in Salesforce sandbox directly, it works preview perfectly.

Code:
<embed allowfullscreen="true" allowscriptaccess="sameDomain" bgcolor="#f3f3f3" flashvars="shepherd_prefix=/sfc/servlet.shepherd&amp;v=068170000008QWaAAM&amp;mode=chatterfilepreview&amp;in_tests=false" id="renditionLarge" name="renditionLarge" pluginspage="http://www.adobe.com/go/getflashplayer" quality="high" src="/_swf/121310/sfc/flex/DocViewer.swf" type="application/x-shockwave-flash" wmode="opaque" align="middle" height="100%" width="100%" />

Could I know what is the issue here?


3) How could we access/preview Attachment docs of Salesforce using <Iframe> tag (or) Google Docs viewer?
i.e., how could we access preview url's for Attachments?

4) If we render Attachment as PDF in VF using "renderAsPDF", is there any issues for documents like for .Doc, .Docx, .PDF, .RTF in review?

5) While using "renderAsPDF", how to get preview content of .Doc, .Docx, .PDF, .RTF files?



Could anyone guide here?
Appreciate your help here.



Thanks,

Hi all.

 

I am trying to connect from Apex to an external WebService that requires the use of ws-security. I have discovered that this is not directly supported by Apex, but a suggested solution was to manually edit the WDSL document to include the ws-security header information.

 

I have been trying to do this without much luck, and was wondering if anyone out there had a simple example of what I need to inject into the WSDL, and where?

 

My thanks in advance,

Ivar

  • December 21, 2010
  • Like
  • 0