public class HtmlResourceResolver
extends com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver
ResourceResolver
to also support SVG images
Constructor and Description |
---|
HtmlResourceResolver(String baseUri, ProcessorContext context)
Creates HtmlResourceResolver instance.
|
Modifier and Type | Method and Description |
---|---|
protected com.itextpdf.kernel.pdf.xobject.PdfXObject |
createImageByUrl(URL url) |
protected com.itextpdf.kernel.pdf.xobject.PdfXObject |
tryResolveBase64ImageSource(String src) |
isDataSrc, isImageTypeSupportedByImageDataFactory, resetCache, resolveAgainstBaseUri, retrieveBytesFromResource, retrieveImage, retrieveImageExtended, retrieveResourceAsInputStream, retrieveStream, retrieveStyleSheet, tryResolveUrlImageSource
public HtmlResourceResolver(String baseUri, ProcessorContext context)
HtmlResourceResolver
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.
context
- ProcessorContext
instance for the current HTML to PDF conversion process
protected com.itextpdf.kernel.pdf.xobject.PdfXObject tryResolveBase64ImageSource(String src)
tryResolveBase64ImageSource
in class com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver
Copyright © 1998–2020 iText Group NV. All rights reserved.