Fork me on GitHub
#cljsjs
<
2016-07-14
>
adamw08:07:22

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

rohit08:07:06

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

adamw10:07:03

hi sorry yes

adamw10:07:16

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

adamw10:07:31

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

adamw10:07:41

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

adamw10:07:20

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

rohit10:07:05

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

rohit10:07:39

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

rohit10:07:02

and I don’t see DefaultTextLayerFactory anywhere

adamw10:07:59

the pdf_viewer.component.js

adamw10:07:05

which somehow extends the PDFJS namespace

rohit10:07:49

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

adamw10:07:17

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

adamw10:07:57

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

rohit10:07:54

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

rohit10:07:52

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

rohit10:07:02

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

adamw10:07:16

I guess that must be it. Annoying if so

rohit10:07:26

I totally agree with you

rohit10:07:49

you could put your comment in that pull request

rohit10:07:09

or raise it as an issue

adamw10:07:50

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

adamw10:07:58

because it includes a bunch of stuff we need

adamw10:07:05

like renderTextlayer

adamw10:07:14

ok, thanks for your help! Been educational 🙂

manishkumarmdb12:07:14

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

manishkumarmdb12:07:21

and how to call in .cljs file