HtmlLoadOptions
Inheritance: java.lang.Object, com.aspose.pdf.LoadOptions com.aspose.pdf.HtmlLoadOptions, com.aspose.pdf.LoadOptions, com.aspose.pdf.HtmlLoadOptions
public final class HtmlLoadOptions extends LoadOptions
Represents options for loading/importing html file into pdf document.
Constructors
| Constructor | Description |
|---|---|
| HtmlLoadOptions | Creates load options for converting html into pdf document with empty base path. |
| HtmlLoadOptions | Creates load options for converting html into pdf document with empty base path. |
Methods
| Method | Description |
|---|---|
| getBasePath | The base path/url for the html file. |
| 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. |
| getHtmlMediaType | Gets or sets possible media types used during rendering. |
| 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. |
| getPageInfo | Gets document page info |
| getPageLayoutOption | Gets or sets layout option. |
| isEmbedFonts | Gets or sets fonts embedding to result document |
| isPriorityCssPageRule | Gets or sets the flag that specifies that @page rules defined in css will override values defined in PageInfo. |
| isRenderToSinglePage | Gets or sets rendering all document to single page |
| setCustomLoaderOfExternalResources | 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. |
| setEmbedFonts | Gets or sets fonts embedding to result document |
| setHtmlMediaType | Gets or sets possible media types used during rendering. |
| setInputEncoding | 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. |
| setPageInfo | Sets document page info |
| setPageLayoutOption | Gets or sets layout option. |
| setPriorityCssPageRule | Gets or sets the flag that specifies that @page rules defined in css will override values defined in PageInfo. |
| setRenderToSinglePage | Gets or sets rendering all document to single page |
HtmlLoadOptions
public HtmlLoadOptions()
Creates load options for converting html into pdf document with empty base path.
HtmlLoadOptions
Creates load options for converting html into pdf document with empty base path.
getBasePath
public String getBasePath()
The base path/url for the html file.
Returns: String value
getCustomLoaderOfExternalResources
public 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.
Returns: ResourceLoadingStrategy instance
getHtmlMediaType
public HtmlMediaType getHtmlMediaType()
Gets or sets possible media types used during rendering.
Returns: HtmlMediaType element
getInputEncoding
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.
Returns: String value
getPageInfo
public PageInfo getPageInfo()
Gets document page info
Returns: page info
getPageLayoutOption
public final int getPageLayoutOption()
Gets or sets layout option.
Returns: HtmlPageLayoutOption element @see HtmlPageLayoutOption
isEmbedFonts
public final boolean isEmbedFonts()
Gets or sets fonts embedding to result document
Returns: boolean value
isPriorityCssPageRule
public final boolean isPriorityCssPageRule()
Gets or sets the flag that specifies that @page rules defined in css will override values defined in PageInfo.
Returns: boolean value
isRenderToSinglePage
public final boolean isRenderToSinglePage()
Gets or sets rendering all document to single page
Returns: boolean value
setCustomLoaderOfExternalResources
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.
setEmbedFonts
public final void setEmbedFonts(boolean value)
Gets or sets fonts embedding to result document
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |
setHtmlMediaType
Gets or sets possible media types used during rendering.
setInputEncoding
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.
setPageInfo
Sets document page info
setPageLayoutOption
public final void setPageLayoutOption(int value)
Gets or sets layout option.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | HtmlPageLayoutOption element @see HtmlPageLayoutOption |
setPriorityCssPageRule
public final void setPriorityCssPageRule(boolean value)
Gets or sets the flag that specifies that @page rules defined in css will override values defined in PageInfo.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |
setRenderToSinglePage
public final void setRenderToSinglePage(boolean value)
Gets or sets rendering all document to single page
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |