I want to embed a pdf in a VF site.
I'm using the "object, embed" method and that works fine for a VF page, however when attempting to make that page externally available via a site, the pdf is no longer available.
Is this a limitation, or do I have the profile permissions incorrect?
Thanks!
Attribution to: jpwagner
Possible Suggestion/Solution #1
Yes you can embed a PDF in a VF page via a data URI. For example...
<apex:page controller="myPDF" sidebar="false" contentType="application/pdf">
<script>
window.location.href = "data:application/pdf;base64,{!myData}";
</script>
</apex:page>
You will need to test on different browsers. Note that you need the base64 encoded data.
Attribution to: MnZ
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/34265