Thanks for responding, Thomas. I was trying another PDF viewer plugin and got it working with AJAX, so my search is over for now. What learned is that there is no problem using AJAX, and in the PHP code doing do_shortcode(‘[shortcode att1=”value” att2=”value” etc]’); For what it’s worth, this works, however …
If the shortcode doesn’t just produce fully functional HTML, but requires JS processing to get it working, you likely have to call something on return from the AJAX call to make that happen. And, if the shortcode doesn’t appear anywhere on the initial page, the JS supporting the shortcode probably hasn’t loaded – so you’ll have to take some action to make it load. But, if these things can be takrn into account, then hot swapping PDF fles being viewed on a page, without using an iframe, is possible (and very cool).
Of course if you are using an iframe then you don’t need AJAX at all.