Interestingly it seems like Chrome does preserve the position but Firefox and IE don't. Regardless, I tried saving the scroll position before hiding and then setting it after showing and this seemed to work.
To select the element that scrolls you can do something like:
var documentContent = $(viewerElement).find('iframe')[0].contentWindow.$('#DocumentViewer');
Then before hiding the container get the scroll values:
var scrollLeft = documentContent.scrollLeft();
var scrollTop = documentContent.scrollTop();
Then after showing the container scroll to those saved positions:
documentContent.scrollLeft(scrollLeft);
documentContent.scrollTop(scrollTop);
Matt Parizeau
Software Developer
PDFTron Systems Inc.