com.pspdfkit.document.html.ResourceInterceptor |
Used to intercept resource requests in HtmlToPdfConverter
to allow providing custom data
for these resources.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract ResourceResponse |
shouldInterceptRequest(ResourceRequest request)
Called when the HTML converter wants to loads a resource (image, stylesheet, JavaScript
etc.).
|
Called when the HTML converter wants to loads a resource (image, stylesheet, JavaScript etc.).
This method is invoked for most supported URI schemes ("http(s):", "file:" etc.) and is not limited to requests made over the network. This is not called for "javascript:", "data:" and "blob:" schemes as well as for Android assets ("file:///android_asset/") or Android resources ("file:///android_res/").
If the source requires redirects, this method is called only for the initial base URL, not for the redirect URLs.
This method is called on the background thread.
null
to proceed with
loading the resource as usual and skipResource()
to skip loading
the resource.