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

# PdfToHtmlConverter

## Overview

`PdfToHtmlConverter` is a class in Aspose.PDF FOSS for .NET.

Converts PDF pages to HTML markup.

This class provides 4 methods for working with PdfToHtmlConverter objects in .NET programs.
Available methods include: `SaveAllPagesAsHtml`, `SaveAsHtml`, `SavePageAsHtml`.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.

## Methods

| Signature | Description |
|-----------|-------------|
| `SaveAsHtml(doc: Document)` | Convert all pages to a single HTML document. |
| `SaveAllPagesAsHtml(doc: Document)` | Convert each page to a separate HTML fragment and return as an array. |
| `SavePageAsHtml(doc: Document, pageNumber: int)` | Convert a single page to an HTML fragment (a &lt;div&gt; with positioned text). |
| `SaveAsHtml(doc: Document, output: Stream)` | Convert all pages to HTML and write to a stream. |

## See Also

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