public final class HtmlLoadOptions extends LoadOptions
Represents options for loading/importing html file into pdf document.
LoadOptions.MarginsAreaUsageModes, LoadOptions.PageSizeAdjustmentModes, LoadOptions.ResourceLoadingResult, LoadOptions.ResourceLoadingStrategy
Modifier and Type | Field and Description |
---|---|
LoadOptions.ResourceLoadingStrategy |
CustomLoaderOfExternalResources
Sometimes it's necessary to avoid usage of internal loader of external resources(like images
or CSSes) and supply custom method that will get requested resources from somewhere.
|
Constructor and Description |
---|
HtmlLoadOptions()
Creates load options for converting html into pdf document with empty base path.
|
HtmlLoadOptions(String basePath)
Creates load options for converting html into pdf document with defined base path.
|
Modifier and Type | Method and Description |
---|---|
String |
getBasePath()
The base path/url for the html file.
|
String |
getInputEncoding()
Gets the attribute specifying the encoding used for this document at the time of the parsing.
|
PageInfo |
getPageInfo()
Gets document page info
|
void |
setInputEncoding(String value)
Sets the attribute specifying the encoding used for this document at the time of the parsing.
|
void |
setPageInfo(PageInfo value)
Sets document page info
|
getLoadFormat, getWarningHandler, setWarningHandler
public LoadOptions.ResourceLoadingStrategy CustomLoaderOfExternalResources
Sometimes it's necessary to avoid usage of internal loader of external resources(like images or CSSes) and supply custom method that will get requested resources from somewhere. For example, during usage of Aspose.PDF in cloud direct access to referenced files impossible: in such case some customer code put into special method should be used, and delegate that refers that method should be assigned to this attribute.
public HtmlLoadOptions()
Creates load options for converting html into pdf document with empty base path.
public HtmlLoadOptions(String basePath)
Creates load options for converting html into pdf document with defined base path.
basePath
- The base path/url for the html file.public String getInputEncoding()
Gets the attribute specifying the encoding used for this document at the time of the parsing. If this attribute is null the encoding will determine from document character set atribute.
public void setInputEncoding(String value)
Sets the attribute specifying the encoding used for this document at the time of the parsing. If this attribute is null the encoding will determine from document character set atribute.
value
- String valuepublic String getBasePath()
The base path/url for the html file.
public PageInfo getPageInfo()
Gets document page info
public void setPageInfo(PageInfo value)
Sets document page info
value
- page infoCopyright © 2019 Aspose. All Rights Reserved.