I checked below post on Exporting to PDF. Although extensions are available I wanted check SAP standard functionality.
Below is how I have set up my application
And this is the code behind PDF export button.
What I see in the PDF output is the components present in my current view. That is if I am in Page 1 only contents in Page 1 is exported to PDF and not the other one.
Is this how the code is supposed to work?