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 requires 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.
|
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
|
boolean |
isEmbedFonts()
Gets or sets fonts embedding to result document
|
boolean |
isRenderToSinglePage()
Gets or sets rendering all document to single page
|
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 |
setRenderToSinglePage(boolean value)
Gets or sets rendering all document to single page
|
getLoadFormat, getWarningHandler, setWarningHandler
public com.aspose.ms.System.Net.ICredentials ExternalResourcesCredentials
If loading of external data referenced in HTML requires 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 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 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 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 elementpublic 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 info