pdfjsLib~PDFDataRangeTransport(length, initialData, progressiveDoneopt, contentDispositionFilenameopt)
Abstract class to support range requests file loading.
NOTE: The TypedArrays passed to the constructor and relevant methods below
will generally be transferred to the worker-thread. This will help reduce
main-thread memory usage, however it will take ownership of the TypedArrays.
Constructor
new PDFDataRangeTransport(length, initialData, progressiveDoneopt, contentDispositionFilenameopt)
Parameters:
Name |
Type |
Attributes |
Default |
Description |
length |
number
|
|
|
|
initialData |
Uint8Array
|
null
|
|
|
|
progressiveDone |
boolean
|
<optional>
|
false
|
|
contentDispositionFilename |
string
|
<optional>
|
null
|
|
- Source:
Methods
addProgressListener(listener)
Parameters:
Name |
Type |
Description |
listener |
function
|
|
- Source:
addProgressiveDoneListener(listener)
Parameters:
Name |
Type |
Description |
listener |
function
|
|
- Source:
addProgressiveReadListener(listener)
Parameters:
Name |
Type |
Description |
listener |
function
|
|
- Source:
addRangeListener(listener)
Parameters:
Name |
Type |
Description |
listener |
function
|
|
- Source:
onDataProgress(loaded, total)
Parameters:
Name |
Type |
Description |
loaded |
number
|
|
total |
number
|
undefined
|
|
- Source:
onDataProgressiveRead(chunk)
Parameters:
Name |
Type |
Description |
chunk |
Uint8Array
|
null
|
|
- Source:
onDataRange(begin, chunk)
Parameters:
Name |
Type |
Description |
begin |
number
|
|
chunk |
Uint8Array
|
null
|
|
- Source:
requestDataRange(begin, end)
Parameters:
Name |
Type |
Description |
begin |
number
|
|
end |
number
|
|
- Source: