You need to sign in to do that
Don't have an account?
Technossus Developer
Control Should not be loss after PDF page creation
Hi all,
As usual I am here with a new issue... I was just thinking can we generate the PDF by Apex code, no doubt we Can an I got the success and able redirect my page to anothet page whic is PDF,, but the problem is after generation of PDF we lost the controle to the salesforce UI, means no tab, no address bar, no left pane menu nothing we got just whole PDF only like that.. So I want to know is there any way so that I will redirect to another page as PDF but controle should not be loss as any normal VF page shows...
Regards
Raman
The problem here is that you redirect the user to a PDF page, and if the browser can it will render that using a PDF plugin or built in engine. At that point, you have left the Salesforce UI behind. One way to workaround this is to open the PDF in a new tab/popup window, such that the user can still go back. Another would be to display the PDF inside an iframe on a VF page, and the VF page could still display the sidebar and header.
Thanks for the reply Bob ! The idea of display the PDF inside an iframe on a VF page sounds good
Can You tell me indetail how to do this thing ????
Regards
Raman
Inside your VF page you'd have something like:
replace MyFrame with the name of your VF page that is rendered as a pdf, and include any parameters required for it to render properly.
You can open the page in another tab/window.
If, for example, you click a button to open the PDF, you can use:
<apex:commandLink value="Open PDF" action="{!openPDF}" target="_new">