mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Address the final round of review comments for Content-Disposition filename extraction
This patch updates the `IPDFStreamReader` interface and ensures that the interface/implementation of `network.js`, `fetch_stream.js`, `node_stream.js`, and `transport_stream.js` all match properly. The unit-tests are also adjusted, to more closely replicate the actual behaviour of the various actual `IPDFStreamReader` implementations. Finally, this patch adjusts the use of the Content-Disposition filename when setting the title in the viewer, and adds `PDFDocumentProperties` support as well.
This commit is contained in:
parent
eb1f6f4c24
commit
69a8336cf1
12 changed files with 151 additions and 121 deletions
|
@ -103,6 +103,16 @@ IPDFStreamReader.prototype = {
|
|||
return null;
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the Content-Disposition filename. It is defined after the headersReady
|
||||
* promise is resolved.
|
||||
* @returns {string|null} The filename, or `null` if the Content-Disposition
|
||||
* header is missing/invalid.
|
||||
*/
|
||||
get filename() {
|
||||
return null;
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets PDF binary data length. It is defined after the headersReady promise
|
||||
* is resolved.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue