You need to sign in to do that
Don't have an account?
mikef
renderAs PDF wrapper
Hi:
I have an existing page that works great that shows the user a consoled view of a few objects.
I want to render this as a pdf but the users want to do this on their own.
So I will have a button on the page that creates the pdf.
My question is can I have a new page just be the pdf wrapper to my existing page and not duplicate the page code for the pdf page?
I have an existing page that works great that shows the user a consoled view of a few objects.
I want to render this as a pdf but the users want to do this on their own.
So I will have a button on the page that creates the pdf.
My question is can I have a new page just be the pdf wrapper to my existing page and not duplicate the page code for the pdf page?
So your page only gets rendered if you visit it with a query parameter of pdf=1.
When you click on the button it forwards you to your page with pdf=1.
And also I conditionally rendered the button based on whether you were creating a pdf or not.