Disclaimer: I realize this has been asked a few times. I've been reading up on this for a while. It's how I got as far as I did. But they haven't helped solve my particular problem.
I am trying to load a pdf in a new tab by clicking on a link, and then print the pdf. Currently I have it working in Chrome and Firefox. Internet Explorer is being stubborn.
This is what I have:
<a href="javascript: w=window.open('Senokot_OnlineCoup_50_fr_syrup.pdf'); w.focus(); w.print();" class="smalllink">Print ›</a>
Adding focus didn't really do anything. There will be multiple pdfs on one page to open. Inline javascript isn't the best option, but I'm trying to avoid iframes if possible, and at the moment it's more about getting the code to work than to have the javascript all nice and perfect. I'm not an expert, so getting it to work is my main focus.
I'm not worried about getting the window to close afterwards. I'd tried, and Chrome refused to open the new tab at all, so I was focusing on the printing part.
Any help is appreciated!