I'm running into an issue that I've been unable to solve surfing the web.
I am storing USPS shipping labels I am receiving from an HTTP request using ContentVersion. I would like for the user to be able to click a button to be redirected to a new tab with the VFP displaying the PDFs in the Content Versions. I have tried many different "solutions" including passing in the base64 to an iframe tag and also passing in the content version ID like so:
<apex:repeat value="{!contentVersionIds}" var="vId">
<div style="page-break-after: always;">
<iframe src="/sfc/servlet.shepherd/version/download/{!vId}" type="application/pdf"></iframe>
</div>
</apex:repeat>
After all I have found and tried, I still am unable to get a PDF Content Version to render on a VFP as a PDF. The best I've been able to get to render is a gray broken image tag. There has to be a way for this to work I would think.
As of right now, each label preview has an anchor tag with src="/sfc/servlet.shepherd/version/download/{!versionId}"
so that the user can open/download/view/print the label but it only displays that one label. When there is more than one label to print the process becomes unnecessarily tedious and slow for the shipping team.
Thanks in advance.
~Holden