function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BARJRDBARJRD 

How to close a PDF

From a Print button on my VFPage1, I create a Pagereference and pass a parameter to VFPage2 (which is rendered as a PDF).   The PDF can now be printed using the Print icon on the PDF toolbar.

 

The question is, how do I navigate away from the PDF?  If the back button is used, it will attempt to redisplay VFPage1 --- which will display incorrectly/incompletely because it needs input parameters.

 

How do I navigate to another page (i.e., without using a "Done" button)?  Is there a JS function that could help in this situation?

 

Thanks,

Barb

aballardaballard

How about opening a pdf in a new window (target='_blank') so that the user just closes the window to "go back"? 

This seems to be what is done by many pages providing this kind of functionality.... 

BARJRDBARJRD

Thanks! ....the _blank option worked --- using a commandLink. 

 

Is there any way to accomplish this using a commandButton?