I just started using the monocle reader and tried using a pdf i downloaded before it has roughly 800 pages and 25mb file size, the problem now is that monocle returns with this error
TypeError: Cannot read property 'onFirstPageOfBook' of null
Resource interpreted as Document but transferred with MIME type application/pdf
If i use a 1 page pdf it works fine.
This is my code:
<script type="text/javascript">
var bookData = {
getComponents: function () {
return [
'coolresume.pdf',
'content1.html'
];
},
getContents: function () {
return [
{title: "Chapter 1", src: 'coolresume.pdf'},
{title: "Chapter 2", src: 'content1.html'}
]
},
getComponent: function (componentId) {
return {url:componentId};
},
getMetaData: function(key) {
return {
title: "Test document",
creator: "Aron Woost"
}[key];
}
}
Monocle.Events.listen(
window,
'load',
function () {
window.reader = Monocle.Reader('reader', bookData);
}
);
</script>
This is were i got my sample PDF, this also works fine for when the same PDF is converted to EPUB