Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

For printable documents I usually want PDF output, but occasionally want to revert to HTML. Is there some mechanism to achieve "PageReference.getContentNotAsPDF"?

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted
<apex:page renderAs="{!$CurrentPage.parameters.renderAs}" />

/apex/pageName?renderAs=pdf

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.