Skip to content
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
56 changes: 49 additions & 7 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 you can install the Telerik Document Processing libraries through NuGet.
title: Installing NuGet Packages
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, document, processing, install, server, manual, download
tags: nuget, document, processing, install, server, manual, download, package
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:
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 setup a local NuGet package source, so you can install the Telerik products without an active Internet connection and without setting up our private feed.
Expand All @@ -40,9 +80,11 @@ This approach allows you to setup a local NuGet package source, so you can insta

![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 enables quick updates with minimal manual intervention.
To install the Telerik Document Processing Libraries, you can use the NuGet packages hosted on the Telerik NuGet server. This online source lets you download and install various versions of the Document Processing libraries and enables quick updates with minimal manual intervention.

Before adding the Telerik NuGet server to Visual Studio, make sure you have:

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**|Enables you to easily extract insights from PDF documents using Large Language Models (LLMs). This functionality enables you to summarize document content and ask questions about it, with the AI providing relevant answers based on the document's 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
25 changes: 13 additions & 12 deletions libraries/radpdfprocessing/editing/table/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,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

Expand Down Expand Up @@ -177,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 Down
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
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: digital, signature, validate
position: 4
position: 6
---

## Validating a Signature
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: Signing Existing Signature Fields
description: Learn how to sign multiple pre-existing signature fields in a PDF document using incremental updates with the PdfStreamSigner class in RadPdfProcessing.
page_title: Signing Existing Signature Fields
slug: radpdfprocessing-features-signing-existing-signature-fields
tags: pdf, processing, digital, signature, signing, incremental, update, field
published: True
position: 5
---

# Signing Existing Signature Fields

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

**RadPdfProcessing** enables you to sign multiple pre-existing signature fields in a PDF document while preserving the validity of previously applied signatures. The `PdfStreamSigner` class applies each signature through an *incremental update*, which appends data to the original PDF instead of rewriting it. This approach ensures that each subsequent signature does not invalidate earlier ones.

PDF documents often contain multiple unsigned signature fields, for example, a contract that requires approval from several parties. When you sign these fields one at a time, each signing operation must preserve the integrity of all previous signatures. The `SignExistingField` method of the `PdfStreamSigner` class addresses this requirement. It locates a pre-existing signature field by name, applies a digital signature, and writes the result as an incremental update to the output stream. You can chain multiple signing operations by feeding the output of one step as the input to the next.

## API Reference

The following table lists the `SignExistingField` method overloads available on the `PdfStreamSigner` class.

| Method signature | Description |
|---|---|
| `SignExistingField(Stream originalStream, string fieldName, Signature signature)` | Signs an existing signature field identified by `fieldName` in the PDF document from `originalStream`. Uses incremental update to preserve previously applied signatures. |
| `SignExistingField(Stream originalStream, string fieldName, Signature signature, FormSource appearance)` | Signs an existing signature field and replaces the widget visual appearance with the specified `FormSource` content. Pass `null` for `appearance` to preserve the existing appearance. |

The following table describes the parameters accepted by the `SignExistingField` method.

| Parameter | Type | Description |
|---|---|---|
| `originalStream` | `Stream` | The stream that contains the current PDF document. |
| `fieldName` | `string` | The name of the pre-existing signature field to sign. |
| `signature` | `Signature` | The digital signature to apply to the field. |
| `appearance` | `FormSource` | The visual appearance to set on the signature widget. Pass `null` to keep the existing appearance. Available only in the overload that accepts a `FormSource` parameter. |

## Signing Existing Fields

To sign multiple existing signature fields in a PDF document:

1. Import the PDF and identify the unsigned signature fields by name.
2. Create a `PdfStreamSigner` instance with an output stream.
3. Call `SignExistingField` for each field, passing the current document stream and the field name.
4. Use the output stream from each step as the input for the next signing operation.

#### Example 1: Import a PDF and Sign All Signature Fields

The following example imports an existing PDF that contains unsigned signature fields and signs each field sequentially using incremental updates.

<snippet id='pdf-signature-sign-all-signature-fields'/>

The code first imports the document to discover the names of all unsigned `SignatureField` instances. It then iterates over the field names and calls `SignExistingField` for each one. Because each call produces an incremental update, previously applied signatures remain valid in the final output.

## Signing with Custom Appearance

When a PDF contains empty (unsigned) signature fields, you can generate and apply a visual appearance during signing. Create a `FormSource`, draw content into it with `FixedContentEditor`, and pass it to the `SignExistingField` overload that accepts an `appearance` parameter. Each signing step produces an incremental update, so previously applied signatures remain valid.

#### Example 2: Sign Existing Fields with Custom Appearance

The following example signs two signature fields and applies a custom visual appearance to each widget at signing time.

<snippet id='pdf-signature-sign-signature-fields-with-appearance'/>

The helper method below builds a visual appearance that displays the signer name, role, and signing date:

<snippet id='pdf-signature-build-appearance'/>

Each call to `SignExistingField` with a `FormSource` replaces the widget appearance of the target field. Pass `null` for the `appearance` parameter to preserve the existing widget appearance.

## See Also

* [Digital Signature in RadPdfProcessing]({%slug radpdfprocessing-features-digital-signature%})
* [Interactive Forms]({%slug radpdfprocessing-model-interactive-forms-form-fields%})
* [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%})
Loading