public final class HtmlLoadOptions extends LoadOptions
Represents options for loading/importing html file into pdf document.
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.
|
boolean |
useNewConversionEngine
Defines whether should be used old or new HTML->PDF conversion engine.
|
ApsIntermediateFileIfAny, XpsIntermediateFileIfAny
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 or sets the attribute specifying the encoding used for this document at the time of the parsing.
|
PageInfo |
getPageInfo()
Gets or sets document page info
|
boolean |
isUseNewConversionEngine() |
void |
setInputEncoding(String value) |
void |
setPageInfo(PageInfo value) |
void |
setUseNewConversionEngine(boolean useNewConversionEngine) |
getLoadFormat, getWarningHandler, setWarningHandler
public boolean useNewConversionEngine
Defines whether should be used old or new HTML->PDF conversion engine.
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 boolean isUseNewConversionEngine()
public void setUseNewConversionEngine(boolean useNewConversionEngine)
public String getInputEncoding()
Gets or 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.
public void setInputEncoding(String value)
public String getBasePath()
The base path/url for the html file.
public PageInfo getPageInfo()
Gets or sets document page info
public void setPageInfo(PageInfo value)
Copyright © 2014 Aspose. All Rights Reserved.