PTWebFontDownloader

@interface PTWebFontDownloader : NSObject

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

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

    Declaration

    Objective-C

    + (BOOL)IsAvailable;

    Swift

    class func isAvailable() -> Bool

    Return Value

    returns true if web font downloading can be done.

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

    Declaration

    Objective-C

    + (void)EnableDownloads;

    Swift

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

    Declaration

    Objective-C

    + (void)DisableDownloads;

    Swift

    class func disableDownloads()
  • download and cache a base collection of fonts in a background thread. Will not do anything if downloading is currently disabled.

    Declaration

    Objective-C

    + (void)PreCacheAsync;

    Swift

    class func preCacheAsync()
  • clear any pre-cached font files residing in persistent storage.

    Declaration

    Objective-C

    + (void)ClearCache;

    Swift

    class func clearCache()
  • Set the root path into which the web font downloader will make requests.

    Declaration

    Objective-C

    + (void)SetCustomWebFontURL:(NSString *)url;

    Swift

    class func setCustomWebFontURL(_ url: String!)

    Parameters

    url

    – The root path into which the web font downloader will make requests.

  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()