HtmlFragment
Vue de l’ensemble
HtmlFragment est une classe dans Aspose.PDF FOSS pour .NET. Inhérité de: BaseParagraph.
Il représente un fragment de contenu HTML qui peut être ajouté à des pages PDF via HeaderFooter.Paragrafs ou Page.Papragraphs.
Cette classe fournit 2 méthodes pour travailler avec des objets HtmlFragment dans les programmes .NET. Les méthodologies disponibles comprennent: Clone, HtmLFrage. Tous les membres publics sont accessibles à n’importe quelle application .Net après l’installation de l’Aspose.PDF FOSS pour le package .net. Propriétés : OrizontalAlignment , HTMLContent ; Hyperlink; HyperlinkText et 10 autres.
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
IsBreakWords | bool | Read/Write | Whether the HTML loader is allowed to break words at line ends. |
IsParagraphHasMargin | bool | Read/Write | Whether the resulting paragraph carries the fragment’s own margin. |
HtmlContent | string? | Read/Write | The raw HTML content. |
HtmlLoadOptions | HtmlLoadOptions? | Read/Write | Options for HTML loading (font embedding, encoding, etc.). |
Margin | MarginInfo | Read/Write | Margins for the fragment. |
IsInNewPage | bool | Read/Write | Whether this fragment should start on a new page. |
IsKeptWithNext | bool | Read/Write | Keep this fragment together with the next paragraph on the same page. |
TextState | Aspose.Pdf.Text.TextState? | Read/Write | Default text state applied to the converted HTML output. |
Rectangle | System.Drawing.RectangleF | Read | Bounding rectangle of the rendered fragment on the page. |
HorizontalAlignment | HorizontalAlignment | Read/Write | Horizontal alignment applied to this paragraph. |
VerticalAlignment | VerticalAlignment | Read/Write | Vertical alignment applied to this paragraph. |
IsFirstParagraphInColumn | bool | Read/Write | Force the paragraph to start a new column. |
IsInLineParagraph | bool | Read/Write | Inline paragraph flag (does not start a new line). |
HyperlinkText | string? | Read/Write | Legacy string-typed hyperlink target. |
Hyperlink | Hyperlink? | Read/Write | Typed hyperlink decoration applied to the paragraph. |
ZIndex | int | Read/Write | Z-order index used by the DOM renderer. |
méthodes
| Signature | Description |
|---|---|
HtmlFragment(text: string) | Create an HtmlFragment from an HTML string. |
Clone() | Shallow clone — the HTML string and reference-typed properties are shared. |
Voir aussi
- Aspose.PDF pour .NET — API d’entreprise