public final class HtmlLoadOptions extends LoadOptions
Represents options for loading/importing html file into pdf document.
LoadOptions.MarginsAreaUsageModes, LoadOptions.PageSizeAdjustmentModes, LoadOptions.ResourceLoadingResult, LoadOptions.ResourceLoadingStrategy
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.
|
LoadOptions.ResourceLoadingStrategy |
getCustomLoaderOfExternalResources()
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.
|
int |
getHtmlMediaType()
Gets or sets possible media types used during rendering.
|
String |
getInputEncoding()
Gets the attribute specifying the encoding used for this document at the time of the parsing.
|
PageInfo |
getPageInfo()
Gets document page info
|
int |
getPageLayoutOption()
Gets or sets layout option.
|
boolean |
isEmbedFonts()
Gets or sets fonts embedding to result document
|
boolean |
isRenderToSinglePage()
Gets or sets rendering all document to single page
|
void |
setCustomLoaderOfExternalResources(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.
|
void |
setEmbedFonts(boolean value)
Gets or sets fonts embedding to result document
|
void |
setHtmlMediaType(int value)
Gets or sets possible media types used during rendering.
|
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
|
void |
setPageLayoutOption(int value)
Gets or sets layout option.
|
void |
setRenderToSinglePage(boolean value)
Gets or sets rendering all document to single page
|
getLoadFormat, getWarningHandler, setWarningHandler
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 final boolean isRenderToSinglePage()
Gets or sets rendering all document to single page
public final void setRenderToSinglePage(boolean value)
Gets or sets rendering all document to single page
value
- boolean valuepublic final boolean isEmbedFonts()
Gets or sets fonts embedding to result document
public final void setEmbedFonts(boolean value)
Gets or sets fonts embedding to result document
value
- boolean valuepublic final int getPageLayoutOption()
Gets or sets layout option.
HtmlPageLayoutOption
public final void setPageLayoutOption(int value)
Gets or sets layout option.
value
- HtmlPageLayoutOption elementHtmlPageLayoutOption
public int getHtmlMediaType()
Gets or sets possible media types used during rendering.
public void setHtmlMediaType(int value)
Gets or sets possible media types used during rendering.
value
- HtmlMediaType elementHtmlMediaType
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 infopublic LoadOptions.ResourceLoadingStrategy getCustomLoaderOfExternalResources()
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 void setCustomLoaderOfExternalResources(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.
customLoaderOfExternalResources
- ResourceLoadingStrategy instance