You need to sign in to do that
Don't have an account?
Vikash Kumar Mandal
getcontentasPDF is not working from site guest user help
Hi All,
I have made a visualforce page and I want to render it as pdf and store in one field. I have created the apex class and using future callout for the generation of PDF. When I tried from the backend then the PDF is generating correctly but at the same time when I am trying from the site guest user then the content is not rendering on PDF. It is generating only the blank PDF.
Please help me with this. How to resolve this issue.
Thanks!
I have made a visualforce page and I want to render it as pdf and store in one field. I have created the apex class and using future callout for the generation of PDF. When I tried from the backend then the PDF is generating correctly but at the same time when I am trying from the site guest user then the content is not rendering on PDF. It is generating only the blank PDF.
Please help me with this. How to resolve this issue.
Thanks!
I think you have to change your URL please put site URL in the page reference URL with the page name I also face this problem once.
This is because the URL of the Page for the Site is changed and it can not access the page so it returns a blank pdf.
Please try this, if any other query feels free to ask.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
All Answers
Please ensure that yout site guest user profile has an access to the Visualforce page that you are trying to render to PDF.
Regards,
Miika
I have all the permission to the site guest user profile but it is not working.
Thanks!
I think you have to change your URL please put site URL in the page reference URL with the page name I also face this problem once.
This is because the URL of the Page for the Site is changed and it can not access the page so it returns a blank pdf.
Please try this, if any other query feels free to ask.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
Deepali Kulshrestha now it is working.
@Deepali/@Vikash
Hi,
I am facing kind of same issue. The only change is that I am using community instead of site. I am also getting blank pdf pages for guest user. I have tried what deepali has mentioned above. I just want to understand whether I am doing it right or not. Suppose my community url is 'https:abc.com'. On runtime, I am attaching some parameters in the URL. Suppose now url is 'https://abc.com/?id=123456'. I tried with both without parameter and with parameter URL in pageReference instance. The pdf is still giving blank pages. Can you please help me?