-
Notifications
You must be signed in to change notification settings - Fork 273
Page rendering is very slow #70
Comments
Do you have any sample project to make use of pdf-annotate.js, The example they gave here works, but I couldn't able to try it out as a new project. Thanks in advance. |
You have to change your documentId |
I changed documentId but I could not able to start a completely new project with pdf-annotate.js. Like how we should make use of it, as a npm package or as an external js file. |
What error you are getting? |
This is what my main.js file looks like. This file will be bundled with webpack. I am using babel-loader. Even then it doesn't allows me to use |
Any idea or some example of how we can use pdf-annotate js? |
Try to clone the package and use. |
Yeah, I tried that and the example worked but with that, I don't know how to use it for production. So I moved on to create a new project and make use of pdf-annotate.js. |
give your path correctly for PDFJS.workerSrc and am getting documentId using js, In documentId you have to mention the exact path |
It worked now, Thank you. I changed |
check whether you have add pdf_viewer.js correctly |
Yeah, Thank you, I forgot to import js file in HTML. But now only one pdf page renders remaining pages are not getting rendered. And the annotation actions are not happening. Do I need to include any file for that (like pdf-annotate.js)? I included one |
In you r code you are rendering only one page.. Try to render all page
Try this one for PDFJS.getDocument function Yes you have to include annotate.js file too.. Include all the files which you need |
renderedPages and slicedToArray are throwing as reference error. May I know what that is? Thank you, Actually all the pages rendered now. But I have doubt regarding which file to import in index.html to make annotations happen. I used |
I have included : <script src="/shared/pdf.js"></script> <script src="/shared/pdf_viewer.js"></script> <script src="/shared/annotate.js"></script>Based upon this include your files.. You should include annotate.js .. You can hide renderedPages.push(1); in getDocument function |
Can I get link for annotate.js, I do have pdf-annotate.js file but that didn't work. And I have hidden renderedPages.push(1) but slicedToArray is still there. May I know what is that. Thanks |
Is this the file I need to include https://github.com/instructure/pdf-annotate.js/blob/master/dist/pdf-annotate.js ? or this https://github.com/instructure/pdf-annotate.js/blob/master/docs/index.js ? |
Include both the files which you said first .. Just mention the path |
Okay, Thank you very much for spending your valuable time. It worked fine. |
Glad to hear. If you find any solution to rendering the page fast means solve my issue too |
Yeah sure. I will let you know if I find some solution for that. |
/var/www/html/pdf/pdf/pdf-annotate.js/node_modules/create-stylesheet/index.js:2 ReferenceError: document is not defined I am getting this error when I use var PDFJSAnnotate = require('pdf-annotate'); |
I have updated the version 2012 to 2017 even though its very slow.
The text was updated successfully, but these errors were encountered: