When using the window.print() to bring up a print dialog, is it possible to target a file or another URL to print?

I have a page that pops up a modal. The modal has window.print() as an onload event. But it wants to print the original page, not the modal.

So if I could define what URL that window.print actually prints, that would be good...