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.
|
com.aspose.ms.System.Net.ICredentials |
ExternalResourcesCredentials
If loading of external data referenced in HTML requirs credentials, You can put them into
this parameter - they will be used during loading of external resources
|
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 com.aspose.ms.System.Net.ICredentials ExternalResourcesCredentials
If loading of external data referenced in HTML requirs credentials, You can put them into this parameter - they will be used during loading of external resources
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 cloude direct access to referenced files impossible: in such case some custome code put into special method should be used, and delegate that refers that method should be assygned to this attribute. Attention! Please note that this feature allowed only when UseNewConversionEngine set to 'true'. Otherwise runtime exception will be thrown!
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 © 2016 Aspose. All Rights Reserved.