+ Start a Discussion
MayTheForceBeWithYouMayTheForceBeWithYou 

Visualforce Integration with PrintFriendly

Having some issues getting my Visualforce page to play nicely with PrintFriendly. The iFrame/modal tool pops up as expected, but then when I click the PDF button I am given an error. I believe this may be due to the fact that Salesforce is a password-protected platform.

 

However, I've tried the /secur/frontdoor.jsp workaround using both methods of entry (session id and straight login credentials) but neither seemed to do the trick. I believe the PrintFriendly service may not be willing to wait for the javascript on SF's server to redirect me to my VFpage.

 

Has anyone integrated with PrintFriendly before that could provide some guidance? It would be much appreciated!

 

PS A little background here-I am using the Google Visualization API to generate an interactive chart; thus I cannot use the renderAs attribute as this would just produce a static PDF of the initial landing page. I've pondered creating parameter(s) for all the different possible customizations but this would be very cumbersome as there are many, plus the number of possible customizations will increase over time.

 

Thanks again!

Best Answer chosen by Admin (Salesforce Developers) 
Avidev9Avidev9
Well one workaround.

You can host your VF page using Force.com site and make it public. TO make it secure you can add a secret URL param. Now use the Force.com Site URL with PrintFriendly

All Answers

Avidev9Avidev9
Well one workaround.

You can host your VF page using Force.com site and make it public. TO make it secure you can add a secret URL param. Now use the Force.com Site URL with PrintFriendly
This was selected as the best answer
MayTheForceBeWithYouMayTheForceBeWithYou

Thanks Avidev9 - I had been trying to avoid going down that path for security concerns, but it is looking more and more like my best option. I'll give it a try and let you know; thanks again!

MayTheForceBeWithYouMayTheForceBeWithYou

Avidev9,

 

Thanks again for your help-I'm beginning to think the Print Friendly service may not work too well with the Google Visualization API in general as it seems to fail on the demo pages as well. I'm still accepting your answer as this would be an acceptable workaround for future developers trying solely to work with the Print Friendly web service-thanks a lot for your response.

MayTheForceBeWithYouMayTheForceBeWithYou

Just came across this old thread and thought I'd share that I was eventually able to get this working by speaking with PrintFriendly's awesome support staff. Apparently there were additional IP addresses I needed to whitelist for PrintFriendly's PDF-generating servers and I also had to publicly host my VFPage's custom CSS files. Happy coding!