I have used the following cod to render as PDF, but website is not render when using the render as PDF/ but if I remove the PDF, the webpage is loading.
Code: <apex:page render="pdf"> // external webstie link (ex: bing.com) </apex:page>
please refer the following.
We cant render as pdf. we can render only when using the third party tool.
You can get the content of the website (the source code) but there is no way to render that as a PDF in your visualforce page. Below is a code how to get the content if that helps:
You can probably use a headless browser and some fancy screen capture method, then add that as an image into your VF PDF, but that's a challenge that I'm leaving with you and good luck :)
I just found one work around for this. We can use third party API to convert any URL into PDF.
Here is site that provide this service
Please note that this is paid service.
They also have Rest API that we can call from SFDC.
Here is sample PDF that i generated for testing.