cljsjs

adamw 2016-07-14T08:51:22.000480Z

@rohit: hi, sorry, didn't know this existed

rohit 2016-07-14T08:53:15.000482Z

@adamw: Have a look at this file: https://github.com/cljsjs/packages/blob/master/pdfjs/build.boot

rohit 2016-07-14T08:55:06.000485Z

you may also need to update the extern if the API has changed

adamw 2016-07-14T10:17:03.000489Z

hi sorry yes

adamw 2016-07-14T10:17:16.000490Z

I agree. So I can generate a better extern using http://www.dotnetwise.com/Code/Externs/

adamw 2016-07-14T10:17:31.000491Z

for pdf.js which evidently doesn't include those two defiitions

adamw 2016-07-14T10:17:41.000492Z

do I need to create a separate viewer.ext.js as well?

adamw 2016-07-14T10:21:20.000493Z

but I can't include that file since it's a separate viewer entirely

adamw 2016-07-14T10:21:21.000494Z

darn

rohit 2016-07-14T10:26:05.000495Z

@adamw: let me try adding the file viewer.inc.js to deps.cljs

rohit 2016-07-14T10:35:39.000496Z

@adamw: on further introspection, i don’t think there is anything wrong

rohit 2016-07-14T10:35:49.000497Z

I looked at the API: https://github.com/mozilla/pdf.js/blob/master/src/display/api.js

rohit 2016-07-14T10:36:02.000499Z

and I don’t see DefaultTextLayerFactory anywhere

adamw 2016-07-14T10:36:59.000502Z

the pdf_viewer.component.js

adamw 2016-07-14T10:37:05.000503Z

which somehow extends the PDFJS namespace

rohit 2016-07-14T10:38:01.000504Z

ok

rohit 2016-07-14T10:38:49.000505Z

so the problem maybe that pdf_viewer.component.js isn’t included in the package

adamw 2016-07-14T10:39:17.000506Z

so this is the thing - if I look at the build/ distribution I don't see how that gets included

adamw 2016-07-14T10:39:57.000507Z

all the definitions are in web/viewer.js but I don't see where it extends the PDFJS namespace in the dist package

rohit 2016-07-14T10:41:54.000508Z

This is where we are picking files for the zip and packaging them: https://github.com/cljsjs/packages/blob/master/pdfjs/build.boot#L23

rohit 2016-07-14T10:43:52.000510Z

@adamw: i also don’t now where it extends the PDFJS namespace

rohit 2016-07-14T10:45:02.000511Z

Is it possible that its not included in the zip file?

adamw 2016-07-14T10:45:08.000512Z

possible

adamw 2016-07-14T10:45:16.000513Z

I guess that must be it. Annoying if so

rohit 2016-07-14T10:45:26.000514Z

I totally agree with you

rohit 2016-07-14T10:45:45.000515Z

😥

rohit 2016-07-14T10:47:49.000516Z

you could put your comment in that pull request

rohit 2016-07-14T10:48:09.000517Z

or raise it as an issue

adamw 2016-07-14T10:49:50.000518Z

ok I can try and make a pull request and create a new dist for https://github.com/mozilla/pdf.js/releases/tag/v1.5.188

adamw 2016-07-14T10:49:58.000520Z

because it includes a bunch of stuff we need

rohit 2016-07-14T10:50:02.000521Z

sure

adamw 2016-07-14T10:50:05.000522Z

like renderTextlayer

adamw 2016-07-14T10:50:14.000523Z

ok, thanks for your help! Been educational 🙂

rohit 2016-07-14T10:50:28.000524Z

np.

manishkumarmdb 2016-07-14T12:04:14.000525Z

any one explain me about :extern compiler option, it means which code to wrote in externs.js file

manishkumarmdb 2016-07-14T12:06:21.000526Z

and how to call in .cljs file