Hi Matt:
I am having a similar issue. On my desktop browser everything is working perfectly. However when I got to my iPhone/iPad I am getting the following error: `Worker encountered an error. This is most likely due to browser incompatibility or memory constraints.`
This is my index.html
```
<!DOCTYPE html>
<html style="height:100%;">
<head>
<title>Knowdex Sample</title>
<meta http-equiv="Content-Type" content="text/html">
<script src="jquery-3.2.1.min.js"></script>
<script src="lib/WebViewer.min.js"></script>
<script src="lib/html5/ControlUtils.js"></script>
<script>
$(function() {
var queryParams = window.ControlUtils.getQueryStringMap(false);
var docType = queryParams.getString('doctype', 'pdf');
var viewerElement = document.getElementById('viewer');
var myWebViewer = new PDFTron.WebViewer({
type: 'html5,html5Mobile',
l: "LICENSE_KEY_GOES_HERE",
path: "lib",
initialDoc: "pdf/WebViewer_Developer_Guide." + docType,
documentType: docType,
config: "config.js",
documentId: "WebViewer_Developer_Guide",
enableAnnotations: true,
streaming: false,
}, viewerElement);
});
</script>
</head>
<body style="width:100%;height:100%;margin:0px;padding:0px;overflow:hidden" oncontextmenu="return false;">
<div id="viewer" style="height: 100%; overflow: hidden;"></div>
</body>
</html>
```
and this is my config.js:
```
/**
* ReaderControl config file
* ------------------------------
* This js file is meant to simplify configuring commonly used settings for ReaderControl.
* You can override default settings through ReaderControl.config properties, or add JavaScript code directly here.
*/
window.WebViewer = {
l: function() {
return 'LICENSE_KEY_GOES_HERE'
}
};
(function() {
//=========================================================
// Load a custom script for the "about" page
//=========================================================
$.extend(ReaderControl.config, {
customScript : 'defaultScriptExtension.js'
});
$(document).on('documentLoaded', function() {
// set select as default
readerControl.setToolMode(window.PDFTron.WebViewer.ToolMode.AnnotationEdit);
// two page reader as default
readerControl.setLayoutMode(CoreControls.DisplayModes.FacingContinuous);
if ($.mobile) {
// one page reader as default in mobile
readerControl.setLayoutMode(CoreControls.DisplayModes.Continuous);
}
});
$(document).bind("viewerLoaded", function(event) {
// hide some buttons that aren't implemented
/*
$('.drop-content').hide().prev().hide();
$('#rotateButton').hide().prev().hide();
$('#fitModes').hide().prev().hide();
$('#docpad').remove();
$('#printButton').hide().prev().hide();
$('#fullScreenButton').hide().prev().hide();
$('#optionsButton').hide().prev().hide();
*/
//$('#freeHand').hide().prev().hide();
/*$('#freeText').hide().prev().hide();*/
/*
$('#overflowTools').hide().prev().hide();
$('#copyButton').hide().prev().hide();
$('#downloadButton').hide().prev().hide();
*/
$('#copyButton').hide().prev().hide();
$('#printButton').hide().prev().hide();
$('#downloadButton').hide().prev().hide();
Tools.Tool.prototype.contextMenu = function(e) {
e.preventDefault();
};
ReaderControl.prototype.setContextMenu = function() {};
var isCtrl = false;
document.onkeyup=function(e)
{
if(e.which == 17)
isCtrl=false;
}
document.onkeydown=function(e)
{
if(e.which == 17)
isCtrl=true;
if((e.which == 85) || (e.which == 67) && isCtrl == true)
{
// alert(‘Keyboard shortcuts are cool!’);
return false;
}
if(e.metaKey){
return false;
}
}
});
})();
```