Class: WebFontDownloader

Core.PDFNet. WebFontDownloader


new WebFontDownloader()

The class WebFontDownloader. static interface to control the behaviour of PDFNet web font downloading

Methods


<static> clearCache()

clear any pre-cached font files residing in persistent storage.
Returns:
Type
Promise.<void>

<static> disableDownloads()

Prevent PDFNet from accessing the network to download missing fonts. It may still use previously downloaded fonts (which are cached on disk).
Returns:
Type
Promise.<void>

<static> enableDownloads()

Allow PDFNet to access the network to download missing fonts when possible.
Returns:
Type
Promise.<void>

<static> isAvailable()

Find out whether the web font downloader is available in version of PDFNet.
Returns:
A promise that resolves to returns true if web font downloading can be done.
Type
Promise.<boolean>

<static> preCacheAsync()

download and cache a base collection of fonts in a background thread. Will not do anything if downloading is currently disabled.
Returns:
Type
Promise.<void>

<static> selectWebFont(font_req_string, charset)

Parameters:
Name Type Description
font_req_string string
charset string
Returns:
A promise that resolves to an object of type: "string"
Type
Promise.<string>

<static> setCustomWebFontURL(url)

Set the root path into which the web font downloader will make requests.
Parameters:
Name Type Description
url string - The root path into which the web font downloader will make requests.
Returns:
Type
Promise.<void>