For that button, configure refresh this action for click event with pxCreatePDF activity as pre-activity. For pxCreatePDF activity, pass your custom section as a parameter along with other required parameters.
Thanks for the solution, but I got stuck at the later part of the activity. It further calls an activity "pyAttachAsPDF" which is failing as I do not know what exactly to pass in the parameters HTMLStream and InsHandle,
Following your trail, I reached at what all you explained. Now my activity is failing and when I check with the tracer, the step 3 of activity "AttachAsPDF" is the cause. The error i'm getting is "Unable to open an instance using the given inputs: pyClassName = History-Data-Portal "
To what I observed is there is a mandatory parameter "PDFDocument" in step 3 of activity "AttachAsPDF", which I am not passing.