Summary: Methods | Inherited Methods | [Expand All]
public class

# WebFontDownloader

extends Object

java.lang.Object
↳ | com.pdftron.pdf.WebFontDownloader

## Class Overview

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

## Summary

Public Methods
static void | clearCache() clear any pre-cached font files residing in persistent storage.
static void | disableDownloads() Prevent PDFNet from accessing the network to download missing fonts.
static void | enableDownloads() Allow PDFNet to access the network to download missing fonts when possible.
static boolean | isAvailable() Find out whether the web font downloader is available in version of PDFNet.
static void | preCacheAsync() download and cache a base collection of fonts in a background thread.
static void | setCustomWebFontURL(String url) Set the root path into which the web font downloader will make requests.

[Expand] Inherited Methods
From class java.lang.Object
boolean | equals(Object arg0)
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## Public Methods

#### public static void clearCache ()

clear any pre-cached font files residing in persistent storage.

##### Throws

PDFNetException |

#### public static void disableDownloads ()

Prevent PDFNet from accessing the network to download missing fonts. It may still use previously downloaded fonts (which are cached on disk).

##### Throws

PDFNetException |

#### public static void enableDownloads ()

Allow PDFNet to access the network to download missing fonts when possible.

##### Throws

PDFNetException |

#### public static boolean isAvailable ()

Find out whether the web font downloader is available in version of PDFNet.

##### Returns

- returns true if web font downloading can be done.

##### Throws

PDFNetException |

#### public static void preCacheAsync ()

download and cache a base collection of fonts in a background thread. Will not do anything if downloading is currently disabled.

##### Throws

PDFNetException |

#### public static void setCustomWebFontURL (String url)

Set the root path into which the web font downloader will make requests. Http paths are not allowed.

##### Parameters

url | -- The root path into which the web font downloader will make requests.

##### Throws

PDFNetException |