The namespace for anything to do with Part Retrievers
Classes
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.
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
Properties:
Name Type Description AndroidContentPartRetrieverstring ArrayBufferPdfPartRetrieverstring AzurePartRetrieverstring ExternalPdfPartRetrieverstring HttpPartRetrieverstring IOSPartRetrieverstring LocalPartRetrieverstring LocalPdfPartRetrieverstring StreamingPartRetrieverstring WinRTPartRetrieverstring WebViewerServerPartRetrieverstring WebDBPartRetrieverstring Example
const partRetriever = await getPartRetriever(PartRetrievers.Types.LocalPdfPartRetriever, file, options);
Methods
-
<static> getPartRetriever(type, file [, options])
-
Parameters:
Name Type Argument Description typeCore.PartRetrievers.Types The type of retriever you want to use. fileFile | Blob | string | ArrayBuffer The file to open with the part retriever optionsObject <optional>
Options to pass to the selected part retriever Properties
Name Type Argument Description decryptfunction <optional>
Function to be called to decrypt a part of the file decryptOptionsfunction <optional>
An object with options for the decryption e.g. {p: "pass", type: "aes"} where is p is the password cacheHintCore.PartRetrievers.CacheHinting <optional>
The type of cache hinting to use useDownloaderboolean <optional>
Whether to use Downloader, defaults to false. filenamestring <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). withCredentialsboolean <optional>
Whether to set the withCredentials property on the XMLHttpRequest serverOptionsObject <optional>
Options to pass to the server. e.g {serverRoot: "http://your-server-domain.com"} Returns:
- Type
- Promise.<Core.PartRetrievers.PartRetriever>