@rohit: hi, sorry, didn't know this existed
@adamw: Have a look at this file: https://github.com/cljsjs/packages/blob/master/pdfjs/build.boot
you may also need to update the extern if the API has changed
hi sorry yes
I agree. So I can generate a better extern using http://www.dotnetwise.com/Code/Externs/
for pdf.js which evidently doesn't include those two defiitions
do I need to create a separate viewer.ext.js as well?
but I can't include that file since it's a separate viewer entirely
darn
@adamw: let me try adding the file viewer.inc.js
to deps.cljs
@adamw: on further introspection, i don’t think there is anything wrong
I looked at the API: https://github.com/mozilla/pdf.js/blob/master/src/display/api.js
and I don’t see DefaultTextLayerFactory
anywhere
yeah - that's in https://github.com/mozilla/pdf.js/blob/8aa5901c205465f781c864c6f4e40d171b025658/web/pdf_viewer.component.js
the pdf_viewer.component.js
which somehow extends the PDFJS namespace
ok
so the problem maybe that pdf_viewer.component.js isn’t included in the package
so this is the thing - if I look at the build/ distribution I don't see how that gets included
all the definitions are in web/viewer.js but I don't see where it extends the PDFJS namespace in the dist package
This is where we are picking files for the zip and packaging them: https://github.com/cljsjs/packages/blob/master/pdfjs/build.boot#L23
@adamw: i also don’t now where it extends the PDFJS namespace
Is it possible that its not included in the zip file?
possible
I guess that must be it. Annoying if so
I totally agree with you
😥
you could put your comment in that pull request
or raise it as an issue
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
because it includes a bunch of stuff we need
sure
like renderTextlayer
ok, thanks for your help! Been educational 🙂
np.
any one explain me about :extern compiler option, it means which code to wrote in externs.js file
and how to call in .cljs file
@manishkumarmdb: have a look at this: https://github.com/clojure/clojurescript/wiki/Packaging-Foreign-Dependencies