Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions common-information/clear-output-stream-on-export.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: Automatic Output Stream Clearing on Export
description: The Export methods of all format providers automatically clear the output stream before writing, preventing corrupted documents when reusing streams.
page_title: Automatic Output Stream Clearing on Export
slug: common-export-output-stream-clearing
tags: export, stream, clear, format, provider, document, processing
published: True
position: 0
---

# Automatic Output Stream Clearing on Export

|Minimum Version|Q2 2026|
|----|----|

As of Q2 2026, the **Export()** methods of all [format providers]({%slug introduction%}#supported-formats) in the Telerik Document Processing Libraries automatically clear the output stream before writing new content. When the **Export()** method is called on a seekable stream, the stream is truncated to zero length prior to writing, ensuring that no stale data remains.

## Behavioral Change

When reusing a **Stream** for multiple consecutive export operations, for example, exporting to a **MemoryStream** or a **FileStream** opened with `FileMode.OpenOrCreate`, the previously written content could remain at the tail of the stream if the new document was smaller than the old one. This caused corrupted output files because trailing bytes from the earlier export persisted after the new export completed.

The stream clearing is now performed automatically by the base classes that all format providers inherit from. The affected format providers include:

| Library | Format Providers |
|---|---|
| RadPdfProcessing | **PdfFormatProvider**, **SkiaImageFormatProvider** |
| RadWordsProcessing | **DocxFormatProvider**, **DocFormatProvider**, **RtfFormatProvider**, **HtmlFormatProvider**, **TxtFormatProvider**, **PdfFormatProvider** |
| RadSpreadProcessing | **XlsxFormatProvider**, **XlsFormatProvider**, **XlsmFormatProvider**, **CsvFormatProvider**, **TxtFormatProvider**, **PdfFormatProvider**, **JsonFormatProvider** |

>note The stream is cleared only when **Stream.CanSeek** returns `true`. Non-seekable streams (such as network streams) are not affected and continue to behave as before.

No code changes are required on the consumer side. The clearing happens automatically inside the **Export()** methods.

## Using the Export Methods with Reused Streams

#### Example 1: Reusing a MemoryStream for multiple exports

<snippet id='reuse-stream-for-multiple-exports'/>

When reusing a stream, the second **Export()** call truncates the stream to zero length before writing, so only the new document data is present.

#### Example 2: Exporting to a FileStream

<snippet id='export-to-filestream'/>

Even when opening the file with `FileMode.OpenOrCreate`, the stream is cleared automatically so no leftover data from a previous file remains.

>tip If you open a **FileStream** with `FileMode.Create`, the file is already truncated by the OS, so the automatic clearing has no additional effect in that scenario.

## Backward Compatibility

>important This is a **behavioral change** in existing **Export()** methods. Code that intentionally preserves prior stream content before calling **Export()** is affected. The stream is now always truncated before writing. If you need to prepend content, write it after the export completes, or use a separate stream and combine them afterward.

For the majority of usage scenarios, where the stream is either freshly created or being reused for a new export, this change is transparent and prevents potential file corruption.

## See Also

* [Using PdfFormatProvider in RadPdfProcessing]({%slug radpdfprocessing-formats-and-conversion-pdf-pdfformatprovider%})
* [Using DocxFormatProvider in RadWordsProcessing]({%slug radwordsprocessing-formats-and-conversion-docx-docxformatprovider%})
* [Timeout Mechanism in Document Processing Libraries]({%slug timeout-mechanism-in-dpl%})
3 changes: 3 additions & 0 deletions docs-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ meta:
libraries/radwordsprocessing/concepts/fields:
title: Fields
position: 0
libraries/radwordsprocessing/formats-and-conversion/markdown:
title: Markdown
position: 6
libraries/radwordsprocessing/formats-and-conversion/plain-text:
title: Plain text
position: 5
Expand Down
68 changes: 55 additions & 13 deletions getting-started/installation/install-nuget-packages.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,62 @@
---
---
title: Install using NuGet Packages
page_title: Install using NuGet Packages
description: Learn how to install the Telerik Document Processing libraries through NuGet packages from a local source or the Telerik NuGet server.
page_title: Install Telerik Document Processing Libraries via NuGet Packages
description: Install the Telerik Document Processing libraries from NuGet.org, the Telerik NuGet server, or a local feed. Includes setup steps for Visual Studio and .NET CLI.
slug: installation-nuget-packages
tags: nuget, packages, telerik, server, document, processing, installation, feed
tags: nuget, packages, telerik, document, processing, installation, feed, server
published: True
position: 7
---

# Install using NuGet Packages

This article describes how you can install the Document Processing Libraries using a NuGet package.
You can find all Document Processing Libraries packages in the [Available NuGet Packages]({%slug available-nuget-packages%}) article. There are two ways for getting the NuGet packages:
This article describes how you can install the Document Processing Libraries using a NuGet package.
You can find all Document Processing Libraries packages in the [Available NuGet Packages]({%slug available-nuget-packages%}) article. There are three ways to get the NuGet packages:

* [Download from NuGet.org (Recommended)](#download-from-nugetorg)

* [Manually download the packages](#manually-download-nuget-packages)

* [Get the packages from the Telerik NuGet server](#download-from-the-nuget-server)

## Download from NuGet.org

As of **Q2 2026**, the Telerik Document Processing NuGet packages are available on <a href="https://www.nuget.org/" target="_blank">NuGet.org</a>. This is the recommended way to install the libraries because NuGet.org is the default package source in Visual Studio and the .NET CLI, so no additional feed configuration is required.

### Install through the Visual Studio NuGet Package Manager

1\. In the Visual Studio Solution Explorer, right-click a project and select **Manage NuGet Packages...**.

2\. Make sure the **Package source** dropdown is set to **nuget.org** (this is the default).

3\. In the **Browse** tab, search for the desired Telerik Document Processing package, for example, `Telerik.Documents.Fixed`.

4\. Select the package and click **Install**.

### Install through the .NET CLI

Run the following command in a terminal, replacing `Telerik.Documents.Fixed` with the name of the package you need:

```
dotnet add package Telerik.Documents.Fixed
```

The .NET CLI resolves packages from NuGet.org by default. You can install a specific version by appending the `--version` parameter:

```
dotnet add package Telerik.Documents.Fixed --version 2024.3.1015
```

### Install through the Package Manager Console

Run the following command in the Visual Studio **Package Manager Console**:

```
Install-Package Telerik.Documents.Fixed
```

>tip You can find the exact package names and available versions for all Document Processing Libraries in the [Available NuGet Packages]({%slug available-nuget-packages%}) article.

## Manually Download NuGet Packages

This approach allows you to set up a local NuGet package source, so you can install the Telerik products without an active Internet connection and without setting up the private feed.
Expand All @@ -27,20 +67,22 @@ This approach allows you to set up a local NuGet package source, so you can inst


**Telerik Document Processing** is also available as a separate distribution in your account: [Download Product Files]({%slug installation-nuget-packages%})

2\. Then, you need to add packages to Visual Studio. Open the NuGet manager and then click the Options button:

![installation-nuget-packages 002](images/installation-nuget-packages001.png)

3\. Add new package source. The __Source__ should point to the local folder with the NuGets:

![install-using-nuget002](images/install-using-nuget002.png)

4\. The final step is to select and install the desired packages.
![install-using-nuget002](images/install-using-nuget002.png)

4\. The final step is to select and install the desired packages.

![install-using-nuget003](images/install-using-nuget003.png)

![install-using-nuget003](images/install-using-nuget003.png)
## Download from the NuGet Server

## Download from the NuGet server
>note As of Q2 2026, NuGet.org is the recommended source for Telerik Document Processing packages. The Telerik NuGet server remains available for backward compatibility and for installing older versions that predate the NuGet.org release.

To install the Telerik Document Processing Libraries, you can use the NuGet packages hosted on the public Telerik NuGet server. This online source lets you download and install various versions of the Document Processing libraries and allows quick updates with minimal manual intervention.

Expand Down
2 changes: 2 additions & 0 deletions introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Telerik Document Processing features the following libraries:
|**Timeout Mechanism**|[Timeout Mechanism]({%slug timeout-mechanism-in-dpl%}) for importing and exporting documents. The **Import** and **Export** methods of all FormatProviders have a mandatory *TimeSpan?* timeout parameter after which the operation will be cancelled.|
|**GenAI-powered Document Insights**|Extract insights from PDF documents using Large Language Models (LLMs). This feature lets you summarize document content and ask questions about it, with the AI providing relevant answers based on the document content. [[Read More]]({%slug radpdfprocessing-features-gen-ai-powered-document-insights-overview%})|
|**AI Coding Assistant**|Provides specialized context to AI models, enabling them to produce higher-quality code samples. [[Read More]]({%slug ai-coding-assistant%})|
|**Automatic Output Stream Clearing on Export**|Automatically clears the output stream before writing new content. [[Read More]]({%slug common-export-output-stream-clearing%})|

For more details about the benefits of using Telerik Document Processing, see the [Telerik Document Processing product overview page](https://www.telerik.com/document-processing-libraries).

Expand All @@ -98,6 +99,7 @@ The Telerik Document Processing libraries support the following file formats:
|**PDF**|[RadWordsProcessing]({%slug radwordsprocessing-overview%}) <br> [RadPdfProcessing]({%slug radpdfprocessing-overview%}) <br> [RadSpreadProcessing]({%slug radspreadprocessing-overview%})|[PdfFormatProvider in RadWordsProcessing]({%slug radwordsprocessing-formats-and-conversion-pdf-pdfformatprovider%}) <sup>Export only</sup> <br> [PdfFormatProvider in RadPdfProcessing]({%slug radpdfprocessing-formats-and-conversion-pdf-pdfformatprovider%}) <br> [PdfFormatProvider in RadSpreadProcessing]({%slug radspreadprocessing-formats-and-conversion-pdf-pdfformatprovider%}) <sup>Export only</sup>|
|**RTF**|[RadWordsProcessing]({%slug radwordsprocessing-overview%})|[RtfFormatProvider]({%slug radwordsprocessing-formats-and-conversion-rtf-rtfformatprovider%})|
|**TXT**|[RadWordsProcessing]({%slug radwordsprocessing-overview%}) <br> [RadPdfProcessing]({%slug radpdfprocessing-overview%}) <br> [RadSpreadProcessing]({%slug radspreadprocessing-overview%})|[TxtFormatProvider in RadWordsProcessing]({%slug radwordsprocessing-formats-and-conversion-txt-txtformatprovider%}) <br> [TextFormatProvider in RadPdfProcessing]({%slug radpdfprocessing-formats-and-conversion-plain-text-textformatprovider%}) <sup>Export only</sup> <br> [TxtFormatProvider in RadSpreadProcessing]({%slug radspreadprocessing-formats-and-conversion-txt-txtformatprovider%})|
|**MD (Markdown)**|[RadWordsProcessing]({%slug radwordsprocessing-overview%})|[MarkdownFormatProvider]({%slug radwordsprocessing-formats-markdownformatprovider%})|
|**XLSX (Excel Workbook)**|[RadSpreadProcessing]({%slug radspreadprocessing-overview%}) <br> [RadSpreadStreamProcessing]({%slug radspreadstreamprocessing-overview%})|[XlsxFormatProvider]({%slug radspreadprocessing-formats-and-conversion-xlsx-xlsxformatprovider%})|
|**XLS (Excel 97-2003 Workbook)**|[RadSpreadProcessing]({%slug radspreadprocessing-overview%})|[XlsFormatProvider]({%slug radspreadprocessing-formats-and-conversion-xls-xlsformatprovider%})|
|**XLSM (macro-enabled spreadsheet created by Microsoft Excel)** <sup>Macros are only preserved during import and export. They cannot be executed or changed in the code.</sup>|[RadSpreadProcessing]({%slug radspreadprocessing-overview%})|[XlsmFormatProvider]({%slug radspreadprocessing-formats-and-conversion-xlsm-xlsmformatprovider%})|
Expand Down
31 changes: 15 additions & 16 deletions libraries/radpdfprocessing/editing/table/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@ The **Table** class helps you easily create tabular data content. All you need t

![Rad Pdf Processing Editing Table 01](images/RadPdfProcessing_Editing_Table_01.png)

This article aims to present the table-related API in `RadPdfProcessing`. It contains the following sections:

* [Defining Table Content](#defining-table-content)

* [Using DefaultCellProperties](#using-defaultcellproperties)

* [Modifying a Table](#modifying-a-table)

* [Drawing Table with RadFixedDocumentEditor](#drawing-table-with-radfixeddocumenteditor)

* [Drawing Table with FixedContentEditor](#drawing-table-with-fixedcontenteditor)


## Defining Table Content

Each table contains a series of [TableRow]({%slug radpdfprocessing-editing-table-tablerow%}) instances each of which contains a series of [TableCell]({%slug radpdfprocessing-editing-table-tablecell%}) instances. To define a simple table, you need to generate the table cells and add some content to them.
Expand Down Expand Up @@ -82,11 +69,11 @@ There are several factors that affect table measuring calculations. Some of them
* **AutoFit** – The table width fits the content unless the needed width is bigger than the available measuring width.
* **FixedWidth** – The table width always fits the available measuring width.

* **HorizontalAlignment**: Specifies the alignment of the table inside the page.
* **HorizontalAlignment**: Specifies the alignment of the table inside the page.

* **BorderSpacing**: Specifies the distance between all the borders in the table. This distance is measured differently depending on the **BorderCollapse** option.

* **BorderCollapse**: Specifies the way the border spacing calculations are done. There are two options:
* **BorderCollapse**: Specifies the way the border spacing calculations are done. There are two options:
* **Collapse**: The distance between borders is measured from the middle lines of the borders.
* **Separate**: The distance between borders is measured from the outer border contour.

Expand Down Expand Up @@ -178,6 +165,19 @@ As a result, on **Figure 7** you can see a 45-degree rotated table similar to th
#### Figure 7: FixedWidth table
![Rad Pdf Processing Editing Table 08](images/RadPdfProcessing_Editing_Table_08.png)

## Measuring a Table

The `Table` class exposes `Measure` overloads that calculate and return the desired size of the table without drawing it. This is useful when you need to know the table dimensions before inserting it into a document—for example, to decide whether to use a new page or to position other content relative to the table.

- **`Measure(CancellationToken)`** – Measures the table against an infinite available size and returns the resulting `Size`. Pass a `CancellationToken` to allow the operation to be cancelled.
- **`Measure(Size, CancellationToken)`** – Measures the table against a constrained available size. Use this overload when the table must fit within a known width or height.

**Example 11** demonstrates how to measure a table both with infinite available size and with a specific size constraint.

#### __Example 11: Measure a table__

<snippet id='libraries-pdf-editing-table-overview-measure-table'/>

## Supported Border Styles

As of **Q3 2024**, along with the BorderStyle.*Single*, RadPdfProcessing offers *Dotted*, *Dashed*, and *DashSmallGap* border styles. With this update, the Dotted, Dashed, DashSmallGap, and Thick border lines are now exported from [RadFlowDocument]({%slug radwordsprocessing-model-radflowdocument%}) to [RadFixedDocument]({%slug radpdfprocessing-model-radfixeddocument%}) as well.
Expand All @@ -201,4 +201,3 @@ As of **Q3 2024**, along with the BorderStyle.*Single*, RadPdfProcessing offers
* [Generating a Table with RadFixedDocumentEditor]({%slug generate-table-with-radfixeddocumenteditor%})
* [Avoiding Table Splits Across Pages Using FixedContentEditor in RadPdfProcessing]({%slug avoid-table-splits-across-pages-radpdfprocessing%})
* [How to Achieve Alternating Row Color for Tables in PdfProcessing]({%slug alternating-row-color-in-pdf-tables%})

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Learn what are the limitations related to the usage of digital sign
page_title: Limitations
slug: radpdfprocessing-features-digital-signature-limitations
tags: digital, signature, limitations, pdf, radpdfprocessing, signing, constraints, certificates, forms
position: 5
position: 7
---

# Limitations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: The digital signature feature enables you to sign and validate a PD
page_title: Signature Validation
slug: radpdfprocessing-features-digital-signature-validation
tags: signature, validation, pdf, certificates, radpdfprocessing, x509, revocation, chain
position: 4
position: 6
---

## Validating a Signature
Expand Down
Loading