Madawar
Madawar

Reputation: 507

PDF.js examples won't run on localhost

Am trying to run pdf.js example on localhost and after downloading i did

 make server

But when i tried to run the examples bundled with the download i got this error

missing variable name
var in = i * n;
http://localhost/pdf.js/src/function.js
Line 174

The PDF file is successfully fetched

GET http://localhost/pdf.js/examples/helloworld/helloworld.pdf 200 OK 210ms

Is there anything i am missing as a requirement?

Upvotes: 1

Views: 1667

Answers (1)

Rob W
Rob W

Reputation: 348992

Yes. Replace tne in variable name with another one, such as input.

in is a special keyword in JavaScript.

  • Usage: 'name' in object.
    The previous will only be true if the 'name' property exists on the given object.
  • Another usage is the enumeration through an object's properties for (name in obj).

Upvotes: 6

Related Questions