Fullscreen Mode in Our JavaScript PDF Viewer
PSPDFKit for Web does not support a fullscreen mode at this point, but you can implement this yourself using the fullscreen API.
The following example outlines an approach that works on multiple browsers:
function requestFullscreen(element) { if (element.requestFullscreen) { element.requestFullscreen(); } else if (element.mozRequestFullScreen) { element.mozRequestFullScreen(); } else if (element.webkitRequestFullscreen) { element.webkitRequestFullscreen(); } else if (element.msRequestFullscreen) { element.msRequestFullscreen(); } } requestFullscreen(pspdfkitContainer);
function requestFullscreen(element) { if (element.requestFullscreen) { element.requestFullscreen(); } else if (element.mozRequestFullScreen) { element.mozRequestFullScreen(); } else if (element.webkitRequestFullscreen) { element.webkitRequestFullscreen(); } else if (element.msRequestFullscreen) { element.msRequestFullscreen(); } } requestFullscreen(pspdfkitContainer);