---
Product: Aspose.PDF
Platform: net
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/net/FloatingBox
---

# FloatingBox

## Overview

`FloatingBox` is a class in Aspose.PDF FOSS for .NET.
Inherits from: `BaseParagraph`.

Represents a floating box that can be positioned absolutely or flowed on a page.

This class provides 5 methods for working with FloatingBox objects in .NET programs.
Available methods include: `Build`, `Clone`, `FloatingBox`.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: `BackgroundColor`, `BackgroundImage`, `Border`, `ColumnInfo`, `Height`, `HorizontalAlignment`, and 16 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `Width` | `double` | Read/Write | Width of the box in points. |
| `Height` | `double` | Read/Write | Height of the box in points. |
| `Left` | `double` | Read/Write | Left position in points (absolute). |
| `Top` | `double` | Read/Write | Top position in points (absolute, measured from top of page). |
| `Border` | `BorderInfo?` | Read/Write | Border around the box. |
| `BackgroundColor` | `Color?` | Read/Write | Background fill color. |
| `IsNeedRepeating` | `bool` | Read/Write | Whether the box should repeat on every page. |
| `Padding` | `MarginInfo?` | Read/Write | Inner padding of the box. |
| `Margin` | `MarginInfo` | Read/Write | Outer margin of the box. |
| `VerticalAlignment` | `VerticalAlignment` | Read/Write | Vertical alignment of content inside the box. |
| `HorizontalAlignment` | `HorizontalAlignment` | Read/Write | Horizontal alignment of the box within its parent. |
| `ZIndex` | `int` | Read/Write | Z-index for layering; higher draws on top. |
| `ColumnInfo` | `ColumnInfo` | Read/Write | Gets or sets the column info. |
| `Paragraphs` | `Paragraphs` | Read/Write | Content paragraphs (TextFragment, Table, or other content objects). |
| `BackgroundImage` | `Image?` | Read/Write | Optional background image rendered behind the box content. |
| `PositioningMode` | `ParagraphPositioningMode` | Read/Write | How Left / Top are interpreted — Default participates in document flow, Absolute pins to page coordinates. |
| `IsFirstParagraphInColumn` | `bool` | Read/Write | Force the paragraph to start a new column. |
| `IsKeptWithNext` | `bool` | Read/Write | Keep this paragraph on the same page as the next one. |
| `IsInNewPage` | `bool` | Read/Write | Force the paragraph to start on a new page. |
| `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. |

## Methods

| Signature | Description |
|-----------|-------------|
| `FloatingBox()` | Create a floating box with default (zero) dimensions. |
| `FloatingBox(width: double, height: double)` | Create a floating box with specified dimensions. |
| `FloatingBox(width: float, height: float)` | Create a floating box with Single-typed dimensions. |
| `Clone()` | Calls Clone on this FloatingBox instance. |
| `Build(page: Page)` | Build the content stream bytes for this floating box on the given page. |

## See Also

- [Aspose.PDF for .NET — Enterprise API Reference](https://reference.aspose.com/pdf/net/)