Using full version of PDFNetJS in Internet Explorer

Skip to first unread message

Matt Parizeau

Sep 9, 2016, 8:57:21 PM9/9/16
to PDFTron WebViewer

I'm trying to use the full version of PDFNetJS and I'm getting the error "yield is not defined" when trying to run this code: var doc = yield PDFNet.PDFDoc.create();
Does Internet Explorer work with the full version of PDFNetJS?


Internet Explorer doesn't support generators so you will need to convert your JavaScript to es5 compatible code to get it to work. As mentioned in this PDFNetJS getting started tutorial
This tutorial and all other PDFNetJS tutorials use ES6 generator functions in JavaScript which are currently supported in Chrome, Firefox, and Opera, but may be unsupported in other browsers. If you are working with a browser without ES6 support, you can take a look at online ES6-to-ES5 transformers such as Facebook's regenerator.
Reply all
Reply to author
0 new messages