You need to sign in to do that
Don't have an account?

render external pdf/blob in visualforce page
Hi,
I'm calling into a 3rd party API from Salesforce using the APEX WSDL wrapper. That 3rd party API provides access to pdf documents as blobs. I'm able to use APEX to access those PDFs and send them on as e-mail messages (using Messaging.SingleEmailMessage and Messaging.EmailFileAttachment) from salesforce. Works great.
However, I would like to also render that PDF in a VisualForce page (it can either render in the page or provide a popup asking the user if they want to save or open the PDF). I see lots of info on how to render existing Salesforce content in PDF but nothing about how you could do this if you already have the PDF in a blob lets say.
I would think it would be something like:
<apex:page contenttype="application/pdf">
<apex:outputText value="{!PDFBlob}" id="thePDFBlob"/></apex:page>
(where i can provide the blob in the controller) but outputText is not the correct component.)
Anyone have any ideas?
Thanks,
-John
Hi
Did you find a solution to this?
I would like to do the same
Natalie
Hey everyone!
Any solution yet (other than saving as an attachment)??? Need this real bad!
Thanks.
This is big problem, Please fix this salesforce!!!
I had the same issue trying to send a PDF via a webservice to APEX then render a VF page as PDF never found solution.
And now I have a VF page I want to render as PDF and save externally and this does not work either:
PageReference pr = new PageReference('/apex/mypage');
Blob pdf = pr.getContentAsPDF()
// code to send PDF to external site.
This code results in a Blank PDF no data in it due to String encoding issues.
I would really like to see string encoding handeled correctly and also allow for HttpRequest setBody to allow a Blob instead of only strings
Someone please give us a hand here!
I also need to programmatically (Apex) select a PDF file in either documents or static resources and display the PDF file in a pop up window. This way the user can keep the PDF open to email, print, etc. while they continue working. The PDF file would be an actual file I would upload to Document or StaticResources.
The Apex code to do this would be in a class method called from a page controller extension class method.
The app is based on Force.com, it doesn't use the SF CRM objects.
Regards,
Ted
Any updates? Is there a post on Ideas that I should vote up?
Did anyone found any solution / work around / best way to do this?
I'm also facing the same issue.
-Naren
Did anyone found a solution to this one?