question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to cancel or destroy a getPage request with disableAutoFetch set

See original GitHub issue

Dear pdf.js contributors,

With disableAutoFetch set, is there a way to cancel fetching on getPage() ? The same way one destroy() getDocument promise

It looks like it is possible but I found only internal functions.

Best, A.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
timvandermeijcommented, Dec 27, 2019

Closing as answered by the comments above.

1reaction
Snuffleupaguscommented, Dec 27, 2019

What is the purpose of PDFDataRangeTransport ?

It allows completely custom data delivery, that you thus can implement in what ever way you want/need in your case (it’s being used in the PDF Viewer that’s built-in to the Firefox browser).

While it does allow a great deal of flexibility, it’s consequently a fair bit more complex than just providing a URL when calling getDocument 😃

I found no examples or use cases out there

There’s the API unit-tests and also the default viewer usages here, here, here and finally here and here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSDoc: Source: api.js
* Abort all network requests and destroy the worker. * @returns {Promise<void>} A promise that is resolved when destruction is; * completed.
Read more >
How to use full PDF.js viewer with toolbar in webpack and ...
I am requiring PDFjs with require('pdfjs-dist/webpack') so it doesn't send the "a fake worker has been set up" warning. I can't really find...
Read more >
JSDoc: Source: display/api.js
workerSrc); /** * Disable range request loading of PDF files. ... disableAutoFetch); /** * Enables special hooks for debugging PDF.js.
Read more >
types/pdfjs-dist/index.d.ts - UNPKG
When range requests are enabled PDF.js will automatically keep ... 226, * NOTE: It is also necessary to disable streaming, see above,.
Read more >
PDF.js - Source code - Greasy Fork
It is a library for other scripts to include with the meta directive // @require https://greasyfork.org/scripts/388114-pdf-js/code/PDFjs.js?version=721820 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found