In trying to create a VisualForce page that renders as a PDF and call that inside of a WebSerivce, I keep getting an HTML content inside the WebService that seems to be redirecting to the login page.
The WebService call is already authenticated and is called from a C# ASP.NET website. Is there a way to call the VisualForce page from the WebService?
What I have tried so far...
PageReference ref = Page.VisualForcePDFPage; ref.getParameters().put('id', recordId); Blob pdf = ref.getContent();
The page prints as PDF fine when directly accessed. Any help is appreciated.