Pdf button to a grid in a form

Hi,

I would like to implement a button in a form that gives the user a pdf preview of another grid in the project. Just like the PDF button in the grid itself.
Best would be when the pdf is shown in a modal window so the user doesn’t leave the current form.

How could I create such a pdf button?

Joe