HtmlFragment
Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph com.aspose.pdf.FormattedFragment com.aspose.pdf.HtmlFragment, com.aspose.pdf.BaseParagraph, com.aspose.pdf.FormattedFragment com.aspose.pdf.HtmlFragment, com.aspose.pdf.FormattedFragment, com.aspose.pdf.HtmlFragment
All Implemented Interfaces: com.aspose.ms.System.ICloneable
public final class HtmlFragment extends FormattedFragment
Represents html fragment.
Constructors
| Constructor | Description |
|---|---|
| HtmlFragment | Initializes a new instance of the HtmlFragment class. |
Methods
| Method | Description |
|---|---|
| deepClone | Clones html fragment. |
| getHtmlLoadOptions | Gets HtmlLoadOptions that will be used for loading (and rendering) of HTML into this instance of class. Please use it when it’s necessary use specific setting for import of HTML for this or that instance (f.e when this or that instance should use specific BasePath for imported HTML or should use specific loader of external resources) If parameter is default (null), then standard HTML loading options will be used. |
| getRectangle | Gets rectangle of the HtmlFragment |
| getTextState | Gets or sets font |
| isBreakWords | Gets or sets words break |
| isParagraphHasMargin | Gets or sets is paragraph has default margin otherwise margin is 0 |
| setBreakWords | Gets or sets words break |
| setHtmlLoadOptions | Sets HtmlLoadOptions that will be used for loading (and rendering) of HTML into this instance of class. Please use it when it’s necessary use specific setting for import of HTML for this or that instance (f.e when this or that instance should use specific BasePath for imported HTML or should use specific loader of external resources) If parameter is default (null), then standard HTML loading options will be used. |
| setParagraphHasMargin | Gets or sets is paragraph has default margin otherwise margin is 0 |
| setTextState | Gets or sets font |
HtmlFragment
Initializes a new instance of the HtmlFragment class.
deepClone
public Object deepClone()
Clones html fragment.
Returns: Cloned html fragment object.
getHtmlLoadOptions
public HtmlLoadOptions getHtmlLoadOptions()
Gets HtmlLoadOptions that will be used for loading (and rendering) of HTML into this instance of class. Please use it when it’s necessary use specific setting for import of HTML for this or that instance (f.e when this or that instance should use specific BasePath for imported HTML or should use specific loader of external resources) If parameter is default (null), then standard HTML loading options will be used.
Returns: HtmlLoadOptions value
getRectangle
public final Rectangle2D.Float getRectangle()
Gets rectangle of the HtmlFragment
Returns: java.awt.geom.Rectangle2D.Float instance
getTextState
public TextState getTextState()
Gets or sets font
Returns: TextState object
isBreakWords
public final boolean isBreakWords()
Gets or sets words break
Returns: boolean value
isParagraphHasMargin
public final boolean isParagraphHasMargin()
Gets or sets is paragraph has default margin otherwise margin is 0
Returns: boolean value
setBreakWords
public final void setBreakWords(boolean value)
Gets or sets words break
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |
setHtmlLoadOptions
Sets HtmlLoadOptions that will be used for loading (and rendering) of HTML into this instance of class. Please use it when it’s necessary use specific setting for import of HTML for this or that instance (f.e when this or that instance should use specific BasePath for imported HTML or should use specific loader of external resources) If parameter is default (null), then standard HTML loading options will be used.
setParagraphHasMargin
public final void setParagraphHasMargin(boolean value)
Gets or sets is paragraph has default margin otherwise margin is 0
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |
setTextState
Gets or sets font