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

ConstructorDescription
HtmlFragmentInitializes a new instance of the HtmlFragment class.

Methods

MethodDescription
deepCloneClones html fragment.
getHtmlLoadOptionsGets 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.
getRectangleGets rectangle of the HtmlFragment
getTextStateGets or sets font
isBreakWordsGets or sets words break
isParagraphHasMarginGets or sets is paragraph has default margin otherwise margin is 0
setBreakWordsGets or sets words break
setHtmlLoadOptionsSets 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.
setParagraphHasMarginGets or sets is paragraph has default margin otherwise margin is 0
setTextStateGets 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:

ParameterTypeDescription
valueboolean 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:

ParameterTypeDescription
valueboolean value

setTextState

Gets or sets font