Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box Preview use pdf library and pdf worker they get loaded on demand #953

Open
watjs opened this issue Mar 6, 2019 · 1 comment
Open

Comments

@watjs
Copy link

watjs commented Mar 6, 2019

I'm using Preview.js version 1.40.0 (https://cdn01.boxcdn.net/platform/preview/1.40.0/en-US/preview.js).

Preview.js loads third-party docs pdf.min.js, pdf.worker.min.js and pdf_viewer from cdn, the link to these JS files are generated according to version inside the library.

I want to check if PDF file is previewable before uploading it to the box, using pdf.js library i can detect wether file is corrupted or protected ( in other word not previewable ).

Does the Preview.js API provides the link to pdf.js library? or the version(1.17.0) used to generate the link?
for example: 'https://cdn01.boxcdn.net/platform/preview/third-party/doc/1.17.0/pdf.worker.min.js'

i want to use the same link that box preview library uses to reduce HTTP and to prevent loading the same library twice.

Thanks in advance.

@cristijora
Copy link

Found myself in the same situation. Have to use a newer version of pdfjs and I cannot do that apparently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants