|
iText 7 7.2.2 API
|
Utilities class to resolve resources. More...
Public Member Functions |
|
| ResourceResolver (String baseUri) | |
| Creates a new ResourceResolver instance. More... |
|
| ResourceResolver (String baseUri, IResourceRetriever retriever) | |
| Creates a new ResourceResolver instance. More... |
|
| virtual IResourceRetriever | GetRetriever () |
| Gets the resource retriever. More... |
|
| virtual iText.StyledXmlParser.Resolver.Resource.ResourceResolver | SetRetriever (IResourceRetriever retriever) |
| Sets the resource retriever. More... |
|
| virtual PdfXObject | RetrieveImage (String src) |
| Retrieve image as either iText.Kernel.Pdf.Xobject.PdfImageXObject , or iText.Kernel.Pdf.Xobject.PdfFormXObject. More... |
|
| virtual byte[] | RetrieveBytesFromResource (String src) |
| Retrieve a resource as a byte array from a source that can either be a link to a file, or a base64 encoded System.String. More... |
|
| virtual Stream | RetrieveResourceAsInputStream (String src) |
| Retrieve the resource found in src as an InputStream More... |
|
| virtual Uri | ResolveAgainstBaseUri (String uri) |
| Resolves a given URI against the base URI. More... |
|
| virtual void | ResetCache () |
| Resets the simple image cache. More... |
|
Static Public Member Functions |
|
| static bool | IsDataSrc (String src) |
| Checks if source is under data URI scheme. More... |
|
Static Public Attributes |
|
| const String | BASE64_IDENTIFIER = "base64" |
| Identifier string used when loading in base64 images. More... |
|
| const String | DATA_SCHEMA_PREFIX = "data:" |
| Identifier string used to detect that the source is under data URI scheme. More... |
|
Utilities class to resolve resources.
|
inline |
Creates a new ResourceResolver instance.
Creates a new ResourceResolver instance. If baseUri is a string that represents an absolute URI with any schema except "file" - resources url values will be resolved exactly as "new URL(baseUrl, uriString)". Otherwise base URI will be handled as path in local file system.
If empty string or relative URI string is passed as base URI, then it will be resolved against current working directory of this application instance.
| baseUri | base URI against which all relative resource URIs will be resolved |
|
inline |
Creates a new ResourceResolver instance.
Creates a new ResourceResolver instance. If baseUri is a string that represents an absolute URI with any schema except "file" - resources url values will be resolved exactly as "new URL(baseUrl, uriString)". Otherwise base URI will be handled as path in local file system.
If empty string or relative URI string is passed as base URI, then it will be resolved against current working directory of this application instance.
| baseUri | base URI against which all relative resource URIs will be resolved |
| retriever | the resource retriever with the help of which data from resources will be retrieved |
|
inlinevirtual |
Gets the resource retriever.
Gets the resource retriever. The retriever is used to retrieve data from resources by URL.
|
inlinestatic |
Checks if source is under data URI scheme.
Checks if source is under data URI scheme. (eg data:[
| src | string to test |
|
inlinevirtual |
Resets the simple image cache.
|
inlinevirtual |
Resolves a given URI against the base URI.
| uri | the uri |
|
inlinevirtual |
Retrieve a resource as a byte array from a source that can either be a link to a file, or a base64 encoded System.String.
| src | either link to file or base64 encoded stream |
|
inlinevirtual |
Retrieve image as either iText.Kernel.Pdf.Xobject.PdfImageXObject , or iText.Kernel.Pdf.Xobject.PdfFormXObject.
| src | either link to file or base64 encoded stream |
|
inlinevirtual |
Retrieve the resource found in src as an InputStream
| src | path to the resource |
|
inlinevirtual |
Sets the resource retriever.
Sets the resource retriever. The retriever is used to retrieve data from resources by URL.
| retriever | the resource retriever |
|
static |
Identifier string used when loading in base64 images.
|
static |
Identifier string used to detect that the source is under data URI scheme.