CreateResourceUrl
Leave feedback
On this page
public interface CreateResourceUrl
Represents an interface that creates a URL for an HTML resource.
The CreateResourceUrl interface is a functional interface that provides a method for creating a URL for an HTML resource. It can be implemented by custom classes to define the behavior of generating a URL for accessing HTML resources.
Example usage:
CreateResourceUrl createResourceUrl = (pageNumber, resource) -> "resource-" + pageNumber + "-" + resource.getFileName();
HtmlViewOptions htmlViewOptions = HtmlViewOptions.forExternalResources(createPageStream, createResourceStream, createResourceUrl);
| Method | Description |
|---|---|
| invoke(int pageNumber, Resource resource) | Represents the method that creates a URL for an HTML resource. |
public abstract String invoke(int pageNumber, Resource resource)
Represents the method that creates a URL for an HTML resource.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pageNumber | int | Number of the page. |
| resource | Resource | HTML resource such as font, style, image, or graphics. |
Returns: java.lang.String - the URL for the HTML resource.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.