Namespace: PartRetrievers

Core. PartRetrievers

The namespace for anything to do with Part Retrievers

Classes

PartRetriever

Members


<static> CacheHinting

The type of hint to provide to browsers for caching the document. The part retriever may use query parameters to influence browser caching behavior.
Type:
  • string
Example
NEVER_CACHE: A unique ID is appended to the document URL.
CACHE: The range of bytes requested is appended to the document URL.
This should be used in most cases.
NO_HINT: Nothing is appended to the document URL.
Useful if you require that the document URL never changes.

<static> Types

An object containing all the possible types of part retrievers. Use in conjunction with getPartRetriever
Type:
  • string
Properties:
Name Type Description
AndroidContentPartRetriever string
ArrayBufferPdfPartRetriever string
AzurePartRetriever string
ExternalPdfPartRetriever string
HttpPartRetriever string
IOSPartRetriever string
LocalPartRetriever string
LocalPdfPartRetriever string
StreamingPartRetriever string
WinRTPartRetriever string
WebViewerServerPartRetriever string
WebDBPartRetriever string
Example
const partRetriever = await getPartRetriever(PartRetrievers.Types.LocalPdfPartRetriever, file, options);

Methods


<static> getPartRetriever(type, file [, options])

Parameters:
Name Type Argument Description
type Core.PartRetrievers.Types The type of retriever you want to use.
file File | Blob | string | ArrayBuffer The file to open with the part retriever
options Object <optional>
Options to pass to the selected part retriever
Properties
Name Type Argument Description
decrypt function <optional>
Function to be called to decrypt a part of the file
decryptOptions function <optional>
An object with options for the decryption e.g. {p: "pass", type: "aes"} where is p is the password
cacheHint Core.PartRetrievers.CacheHinting <optional>
The type of cache hinting to use
useDownloader boolean <optional>
Whether to use Downloader, defaults to false.
filename string <optional>
A filename that is only useful when the type is ExternalPdfPartRetriever. Use this option when the filename can't be determined from file(the second argument).
withCredentials boolean <optional>
Whether to set the withCredentials property on the XMLHttpRequest
serverOptions Object <optional>
Options to pass to the server. e.g {serverRoot: "http://your-server-domain.com"}
Returns:
Type
Promise.<Core.PartRetrievers.PartRetriever>