From a0638a75eb3193bee86c7cfeedc212b37564d267 Mon Sep 17 00:00:00 2001 From: Desislava Yordanova Date: Wed, 1 Oct 2025 18:39:48 +0300 Subject: [PATCH 01/13] ZugferdConformanceLevel --- .../embedded-file-streams.md | 41 +--------- .../embedded-file-streams/zugferd-invoices.md | 78 +++++++++++++++++++ 2 files changed, 79 insertions(+), 40 deletions(-) create mode 100644 libraries/radpdfprocessing/features/embedded-file-streams/zugferd-invoices.md diff --git a/libraries/radpdfprocessing/features/embedded-file-streams/embedded-file-streams.md b/libraries/radpdfprocessing/features/embedded-file-streams/embedded-file-streams.md index 6b3dd08d..f41eba6b 100644 --- a/libraries/radpdfprocessing/features/embedded-file-streams/embedded-file-streams.md +++ b/libraries/radpdfprocessing/features/embedded-file-streams/embedded-file-streams.md @@ -41,46 +41,7 @@ RadFixedDocument stores the integrated files in an **EmbeddedFilesCollection** a ### Creating an Embedded Electronic (ZUGFeRD) Invoice -RadPdfProcessing provides support for embedding of [ZUGFeRD](https://de.wikipedia.org/wiki/ZUGFeRD) (acronym for Zentraler User Guide des Forums elektronische Rechnung Deutschland) invoices. - -#### **[C#] Add ZUGFeRD invoice** - -{{region cs-radpdfprocessing-embedded-file-add-zugferd-invoice}} - - RadFixedDocument document = new RadFixedDocument(); - using (RadFixedDocumentEditor editor = new RadFixedDocumentEditor(document)) - { - editor.CharacterProperties.TrySetFont(new System.Windows.Media.FontFamily("Calibri")); - editor.InsertRun("PDF/A-3B Compliant Invoice"); - }; - byte[] bytes = File.ReadAllBytes(@"zugferd-invoice.xml"); - document.EmbeddedFiles.AddZugferdInvoice(bytes); - - PdfFormatProvider provider = new PdfFormatProvider(); - PdfExportSettings settings = new PdfExportSettings(); - settings.ComplianceLevel = PdfComplianceLevel.PdfA3B; - provider.ExportSettings = settings; - using (Stream output = File.OpenWrite("exportedInvoice.pdf")) - { - provider.Export(document, output); - } - -{{endregion}} - ->note Only a single XML invoice attachment is allowed according to ZUGFeRD standard. - ->important To comply with the PDF/A-3B standard all the fonts in the documents should be embedded, so please avoid using [Standard Fonts]({%slug radpdfprocessing-concepts-fonts%}) because they are not being embedded in the document. In **.NET Standard/.NET (Target OS: None)** environments, fonts beyond the [14 standard ones]({%slug radpdfprocessing-concepts-fonts%}#standard-fonts) require a [FontsProvider implementation]({%slug pdfprocessing-implement-fontsprovider%}) to be resolved correctly. - -#### **[C#] Remove ZUGFeRD invoice** - -{{region cs-radpdfprocessing-embedded-file-remove-zugferd-invoice}} - - if (document.EmbeddedFiles.ContainsZugferdInvoice) - { - document.EmbeddedFiles.RemoveZugferdInvoice(); - } - -{{endregion}} +RadPdfProcessing provides support for embedding of [ZUGFeRD invoices]({%slug radpdfprocessing-embedded-file-streams-zugferd-invoices%}). ### Using the MergedEmbeddedFileNameResolving event diff --git a/libraries/radpdfprocessing/features/embedded-file-streams/zugferd-invoices.md b/libraries/radpdfprocessing/features/embedded-file-streams/zugferd-invoices.md new file mode 100644 index 00000000..7b0325a1 --- /dev/null +++ b/libraries/radpdfprocessing/features/embedded-file-streams/zugferd-invoices.md @@ -0,0 +1,78 @@ +--- +title: ZUGFeRD invoices +description: Learn how to embed a ZUGFeRD invoice into a PDF document utilizing the Telerik PdfProcessing library. +page_title: ZUGFeRD invoices +slug: radpdfprocessing-embedded-file-streams-zugferd-invoices +tags: pdf, file, stream, embedded, zugferd, invoice +position: 1 +--- + +# ZUGFeRD invoices + +|Minimum Version|Q4 2025| +|----|----| + +[ZUGFeRD](https://de.wikipedia.org/wiki/ZUGFeRD) (acronym for Zentraler User Guide des Forums elektronische Rechnung Deutschland) is a specification for the electronic invoice format of the same name. **RadPdfProcessing** provides support for embedding of ZUGFeRD invoices. + +### Creating an Embedded Electronic (ZUGFeRD) Invoice + +#### **[C#] Add ZUGFeRD invoice** + +{{region cs-radpdfprocessing-embedded-file-add-zugferd-invoice}} + + RadFixedDocument document = new RadFixedDocument(); + using (RadFixedDocumentEditor editor = new RadFixedDocumentEditor(document)) + { + editor.CharacterProperties.TrySetFont(new System.Windows.Media.FontFamily("Calibri")); + editor.InsertRun("PDF/A-3B Compliant Invoice"); + }; + byte[] bytes = File.ReadAllBytes(@"zugferd-invoice.xml"); + document.EmbeddedFiles.AddZugferdInvoice(bytes); + + PdfFormatProvider provider = new PdfFormatProvider(); + PdfExportSettings settings = new PdfExportSettings(); + settings.ComplianceLevel = PdfComplianceLevel.PdfA3B; + provider.ExportSettings = settings; + using (Stream output = File.OpenWrite("exportedInvoice.pdf")) + { + provider.Export(document, output); + } + +{{endregion}} + +>note Only a single XML invoice attachment is allowed according to ZUGFeRD standard. + +>important To comply with the PDF/A-3B standard all the fonts in the documents should be embedded, so please avoid using [Standard Fonts]({%slug radpdfprocessing-concepts-fonts%}) because they are not being embedded in the document. In **.NET Standard/.NET (Target OS: None)** environments, fonts beyond the [14 standard ones]({%slug radpdfprocessing-concepts-fonts%}#standard-fonts) require a [FontsProvider implementation]({%slug pdfprocessing-implement-fontsprovider%}) to be resolved correctly. + +#### **[C#] Remove ZUGFeRD invoice** + +{{region cs-radpdfprocessing-embedded-file-remove-zugferd-invoice}} + + if (document.EmbeddedFiles.ContainsZugferdInvoice) + { + document.EmbeddedFiles.RemoveZugferdInvoice(); + } + +{{endregion}} + +## ZugferdConformanceLevel + +Specifies the ZUGFeRD (Factur-X) conformance level to use when exporting PDF invoices. Higher levels generally include all requirements of the lower levels and add more structured data to support automated processing and validation scenarios. + +As of **Q4 2025** RadPdfProcessing offers the functionality to specify the **ZugferdConformanceLevel**. The available options are: + +* **Minimum**: The minimal profile providing only the essential data needed for a compliant e-invoice. Suitable for simple use cases with limited automation. +* **Basic**: The basic profile providing core structured data for improved interoperability and basic automated processing between trading partners. This is the default value. +* **Comfort**: The comfort profile with richer structured content, typically aligned with common business requirements to enable advanced automation. +* **Extended**: The most comprehensive profile including extended data elements to cover advanced or industry-specific scenarios beyond the comfort profile. + +```` +RadFixedDocument document = new RadFixedDocument(); +document.EmbeddedFiles.AddZugferdInvoice(new byte[3] { 1, 2, 3 }, ZugferdConformanceLevel.Comfort); +```` + +The ZugferdConformanceLevel can be passed through: + +* ExportSettings +* Directly to the EmbeddedFilesCollection.AddZugferdInvoice() method + From 32d46279970f61da87e70d56791d39b37ba5388a Mon Sep 17 00:00:00 2001 From: Desislava Yordanova Date: Fri, 3 Oct 2025 13:09:52 +0300 Subject: [PATCH 02/13] polishing zugferd --- .../embedded-file-streams/embedded-file-streams.md | 2 +- .../embedded-file-streams/zugferd-invoices.md | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/libraries/radpdfprocessing/features/embedded-file-streams/embedded-file-streams.md b/libraries/radpdfprocessing/features/embedded-file-streams/embedded-file-streams.md index f41eba6b..2c8636d4 100644 --- a/libraries/radpdfprocessing/features/embedded-file-streams/embedded-file-streams.md +++ b/libraries/radpdfprocessing/features/embedded-file-streams/embedded-file-streams.md @@ -41,7 +41,7 @@ RadFixedDocument stores the integrated files in an **EmbeddedFilesCollection** a ### Creating an Embedded Electronic (ZUGFeRD) Invoice -RadPdfProcessing provides support for embedding of [ZUGFeRD invoices]({%slug radpdfprocessing-embedded-file-streams-zugferd-invoices%}). +RadPdfProcessing provides support for embedding [ZUGFeRD invoices]({%slug radpdfprocessing-embedded-file-streams-zugferd-invoices%}). ### Using the MergedEmbeddedFileNameResolving event diff --git a/libraries/radpdfprocessing/features/embedded-file-streams/zugferd-invoices.md b/libraries/radpdfprocessing/features/embedded-file-streams/zugferd-invoices.md index 7b0325a1..878bb91f 100644 --- a/libraries/radpdfprocessing/features/embedded-file-streams/zugferd-invoices.md +++ b/libraries/radpdfprocessing/features/embedded-file-streams/zugferd-invoices.md @@ -40,7 +40,7 @@ position: 1 {{endregion}} ->note Only a single XML invoice attachment is allowed according to ZUGFeRD standard. +>note Only a single XML invoice attachment is allowed according to the ZUGFeRD standard. >important To comply with the PDF/A-3B standard all the fonts in the documents should be embedded, so please avoid using [Standard Fonts]({%slug radpdfprocessing-concepts-fonts%}) because they are not being embedded in the document. In **.NET Standard/.NET (Target OS: None)** environments, fonts beyond the [14 standard ones]({%slug radpdfprocessing-concepts-fonts%}#standard-fonts) require a [FontsProvider implementation]({%slug pdfprocessing-implement-fontsprovider%}) to be resolved correctly. @@ -57,9 +57,9 @@ position: 1 ## ZugferdConformanceLevel -Specifies the ZUGFeRD (Factur-X) conformance level to use when exporting PDF invoices. Higher levels generally include all requirements of the lower levels and add more structured data to support automated processing and validation scenarios. +As of **Q4 2025** RadPdfProcessing provides support for specifying the ZUGFeRD (Factur-X) **conformance level** to use when exporting PDF invoices. Higher levels generally include all requirements of the lower levels and add more structured data to support automated processing and validation scenarios. -As of **Q4 2025** RadPdfProcessing offers the functionality to specify the **ZugferdConformanceLevel**. The available options are: +RadPdfProcessing offers the functionality to specify the **ZugferdConformanceLevel** when embedding the invoice. The available options are: * **Minimum**: The minimal profile providing only the essential data needed for a compliant e-invoice. Suitable for simple use cases with limited automation. * **Basic**: The basic profile providing core structured data for improved interoperability and basic automated processing between trading partners. This is the default value. @@ -68,11 +68,6 @@ As of **Q4 2025** RadPdfProcessing offers the functionality to specify the **Zug ```` RadFixedDocument document = new RadFixedDocument(); -document.EmbeddedFiles.AddZugferdInvoice(new byte[3] { 1, 2, 3 }, ZugferdConformanceLevel.Comfort); +document.EmbeddedFiles.AddZugferdInvoice(File.ReadAllBytes(@"zugferd-invoice.xml"), ZugferdConformanceLevel.Comfort); ```` -The ZugferdConformanceLevel can be passed through: - -* ExportSettings -* Directly to the EmbeddedFilesCollection.AddZugferdInvoice() method - From cd8181aacbaeebc19506b07f70cbc0ccb92574a6 Mon Sep 17 00:00:00 2001 From: Desislava Yordanova Date: Fri, 3 Oct 2025 17:26:41 +0300 Subject: [PATCH 03/13] RadFixedPage and RadFixedDocument articles review --- libraries/radpdfprocessing/model/radfixeddocument.md | 11 +++++++++-- libraries/radpdfprocessing/model/radfixedpage.md | 8 +++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/libraries/radpdfprocessing/model/radfixeddocument.md b/libraries/radpdfprocessing/model/radfixeddocument.md index e03460f1..327ab058 100644 --- a/libraries/radpdfprocessing/model/radfixeddocument.md +++ b/libraries/radpdfprocessing/model/radfixeddocument.md @@ -10,7 +10,7 @@ position: 1 # RadFixedDocument -__RadFixedDocument__ hosts fixed document content and is the root element in the document elements tree. It holds a collection of [RadFixedPage]({%slug radpdfprocessing-model-radfixedpage%}) elements. +**RadFixedDocument** is a core class in the Telerik Document Processing libraries, specifically within the PdfProcessing model. This article will get you familiar with the basics of __RadFixedDocument__. It contains the following sections: @@ -22,7 +22,7 @@ This article will get you familiar with the basics of __RadFixedDocument__. It c ## What Is RadFixedDocument -__RadFixedDocument__ is the root that contains all other elements in the __RadPdfProcessing__ model. It exposes the following public API: +**RadFixedDocument** is the main document unit of the **PdfProcessing** model. It represents the root element of a fixed-layout PDF document and serves as the container for all other document elements. RadFixedDocument holds a collection of [RadFixedPage]({%slug radpdfprocessing-model-radfixedpage%}) elements. It exposes the following public API: |Property Name|Description| |----|----| @@ -54,6 +54,13 @@ __RadFixedDocument__ is the root that contains all other elements in the __RadPd |**MergedEmbeddedFileNameResolving**|Occurs when trying to resolve conflicts between the embedded file names while merging RadFixedDocument instances.| |**MergedJavaScriptNameResolving**|Occurs when trying to resolve conflicts between the JavaScript names while merging RadFixedDocument instances.| + +RadFixedDocument is typically used when: + +* Creating a PDF document from scratch programmatically: a complete example is available in the [PdfProcessing Basic Usage demo](https://demos.telerik.com/document-processing/pdfprocessing). +* Extracting or manipulating content from existing PDF documents: first import any existing PDF documents with the help of the [PdfFormatProvider]({%slug radpdfprocessing-formats-and-conversion-pdf-pdfformatprovider%}). +* Generating structured, fixed-layout documents with precise control over layout and formatting: [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) and [RadFixedDocumentEditor]({%slug radpdfprocessing-editing-radfixeddocumenteditor%}) allow you to create a RadFixedDocument either with managing the position or in a flow-like manner and insert all desired elements one after another. + >note A complete SDK example how to generate a document is available [here](https://github.com/telerik/document-processing-sdk/tree/master/PdfProcessing/GenerateDocument). __Example 1__ shows how you can create a new __RadFixedDocument__ instance. diff --git a/libraries/radpdfprocessing/model/radfixedpage.md b/libraries/radpdfprocessing/model/radfixedpage.md index 5519c1ba..01dee341 100644 --- a/libraries/radpdfprocessing/model/radfixedpage.md +++ b/libraries/radpdfprocessing/model/radfixedpage.md @@ -31,7 +31,13 @@ __RadFixedPage__ exposes the following properties: |__CropBox__| Defines the region to which the contents of the page are clipped (cropped) when displayed or printed. This boundary determines the visible page content. The default value is the page’s media box. | |__Size__|Property of type Size representing the size of the page. Its value is determined by the width and height of the **MediaBox**.| |__Rotation__|Property of type [Rotation](https://docs.telerik.com/devtools/document-processing/api/Telerik.Windows.Documents.Fixed.Model.Data.Rotation.html) representing the page rotation.| -|**Actions**|Gets the page [actions]({%slug radpdfprocessing-model-action-collections%}#pageactioncollection) collection.| +|**Actions**|Gets the page [actions]({%slug radpdfprocessing-model-action-collections%}#pageactioncollection) collection.| + +RadFixedPage is typically used when: + +* Creating a PDF document (and its pages) from scratch programmatically: a complete example is available in the [PdfProcessing Basic Usage demo](https://demos.telerik.com/document-processing/pdfprocessing). +* Loading page content from existing PDF documents: you cannot deserialize a RadFixedPage directly from a byte array (memory stream) because pages are part of the document structure. The [PdfFormatProvider]({%slug radpdfprocessing-formats-and-conversion-pdf-pdfformatprovider%}) handles the parsing and conversion from raw PDF bytes to the structured RadFixedDocument object. Once imported, you can manipulate individual pages (RadFixedPage) as needed. +* Generating structured, fixed-layout documents with precise control over layout and formatting: [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) and [RadFixedDocumentEditor]({%slug radpdfprocessing-editing-radfixeddocumenteditor%}) allow you to create a RadFixedDocument either with managing the position or in a flow-like manner and insert all desired elements one after another. __Example 1__ demonstrates how to create a new __RadFixedPage__ instance and add it to the __Pages__ collection of __RadFixedDocument__. From b154326a525a1dd4e641bb31acb021dbf1b6011b Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Mon, 6 Oct 2025 12:32:12 +0300 Subject: [PATCH 04/13] Updated TextFormatProvider with timeout mechanism. --- .../formats-and-conversion/plain-text/settings.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/radpdfprocessing/formats-and-conversion/plain-text/settings.md b/libraries/radpdfprocessing/formats-and-conversion/plain-text/settings.md index 05c940f2..b9a9a3d3 100644 --- a/libraries/radpdfprocessing/formats-and-conversion/plain-text/settings.md +++ b/libraries/radpdfprocessing/formats-and-conversion/plain-text/settings.md @@ -49,7 +49,8 @@ The __Export()__ method of **TextFormatProvider** allows you to pass a **TextFor RadFixedDocument document = CreateRadFixedDocument(); TextFormatProvider provider = new TextFormatProvider(); - string text = provider.Export(document, settings); + string text = provider.Export(document, settings); // Obsolete since Q4 2025 + string text = provider.Export(document, settings, TimeSpan.FromSeconds(10)); {{endregion}} From e92959de265ad6d7a90b9ca676c854d266fe5394 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Mon, 6 Oct 2025 13:15:03 +0300 Subject: [PATCH 05/13] Documented AnnotationBorderStyle. --- libraries/radpdfprocessing/model/annotations/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/radpdfprocessing/model/annotations/overview.md b/libraries/radpdfprocessing/model/annotations/overview.md index 34bc3916..bcf8cebe 100644 --- a/libraries/radpdfprocessing/model/annotations/overview.md +++ b/libraries/radpdfprocessing/model/annotations/overview.md @@ -33,7 +33,7 @@ The abstract **Annotation** element associates an object with a location on a [R |[TextMarkup]({%slug radpdfprocessing-model-annotations-text-markup%})| Text markup annotations appear as **Highlights**, **Underlines**, **Strikeouts** or **Squiggly** underlines in the text of a document. When opened, they display a pop-up window containing the text of the associated note.| |[Popup]({%slug radpdfprocessing-model-annotations-popup%})|A popup annotation is associated with another [markup annotation]({%slug radpdfprocessing-model-annotations-overview%}) and displays its content in a pop-up window for entry and editing. It typically appears as a pop-up note.| -* **Border**: Represents the annotation borders. This property is of type [AnnotationBorder](https://docs.telerik.com/devtools/document-processing/api/Telerik.Windows.Documents.Fixed.Model.Annotations.AnnotationBorder.html). +* **Border**: Represents the annotation borders. This property is of type [AnnotationBorder](https://docs.telerik.com/devtools/document-processing/api/Telerik.Windows.Documents.Fixed.Model.Annotations.AnnotationBorder.html) that uses an [AnnotationBorderStyle](https://docs.telerik.com/devtools/document-processing/api/telerik.windows.documents.fixed.model.annotations.annotationborderstyle). * **IsPrintable**: A boolean value that indicates whether the annotation instance should be visualized when printing the document. When set to *false*, the annotation won't appear when the document is printed. From 2a35f69088ff2c7d32dcf5686ac3b807a1b2f0f3 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Mon, 6 Oct 2025 13:52:47 +0300 Subject: [PATCH 06/13] Stylisic changes. --- .../model/actions/js-actions/action-collections.md | 2 +- libraries/radpdfprocessing/model/formsource/overview.md | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/libraries/radpdfprocessing/model/actions/js-actions/action-collections.md b/libraries/radpdfprocessing/model/actions/js-actions/action-collections.md index 36a747bf..9dca8b3b 100644 --- a/libraries/radpdfprocessing/model/actions/js-actions/action-collections.md +++ b/libraries/radpdfprocessing/model/actions/js-actions/action-collections.md @@ -98,7 +98,7 @@ Represents a collection of Action objects associated with a [RadFixedPage]({%slu |OnPageOpen|Gets or sets the collection of actions triggered when the page is opened.| |OnPageClose|Gets or sets the collection of actions triggered when the page is closed.| -The following example shows how to utilize the JavaScript Actions functionality showing an alert when the second page in a document is closed +The following example shows how to utilize the JavaScript Actions functionality showing an alert when the second page in a document is closed: ```csharp diff --git a/libraries/radpdfprocessing/model/formsource/overview.md b/libraries/radpdfprocessing/model/formsource/overview.md index e06a3c26..6e2df6de 100644 --- a/libraries/radpdfprocessing/model/formsource/overview.md +++ b/libraries/radpdfprocessing/model/formsource/overview.md @@ -32,10 +32,11 @@ The FormSource class exposes a default constructor which you can use to create a The snippet from **Example 1** will create an empty FormSource object. To fill this object with content you can use [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) as described later in this article. The properties exposed by the **FormSource** class are as follows: -|Property|Description| -|----|----| -|**Size**|Allows getting or setting the size of the form.| -|**Content**|Gets the contents of the form.| + +| Property | Description | +| ---- | ---- | +| **Size** | Allows getting or setting the size of the form. | +| **Content** | Gets the contents of the form. | ## Adding Content to a FormSource Object From 459798c683c7c00909c69ef0675b5856c1ee52f0 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Mon, 6 Oct 2025 18:31:11 +0300 Subject: [PATCH 07/13] Documented ExpandableMemoryStream. --- .../pdf/expandablememorystream.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 libraries/radpdfprocessing/formats-and-conversion/pdf/expandablememorystream.md diff --git a/libraries/radpdfprocessing/formats-and-conversion/pdf/expandablememorystream.md b/libraries/radpdfprocessing/formats-and-conversion/pdf/expandablememorystream.md new file mode 100644 index 00000000..ea882047 --- /dev/null +++ b/libraries/radpdfprocessing/formats-and-conversion/pdf/expandablememorystream.md @@ -0,0 +1,42 @@ +--- +title: ExpandableMemoryStream +page_title: ExpandableMemoryStream +description: Learn about the segmented, dynamically growing in-memory stream implementation used for large PDF processing scenarios. +slug: radpdfprocessing-formats-and-conversion-pdf-expandablememorystream +tags: pdf, memory, performance, stream, fixed, document, processing, dpl, format, expandablememorystream, large, file, size +published: True +position: 3 +--- + +# ExpandableMemoryStream + +## Overview + +ExpandableMemoryStream is a segmented in‑memory stream optimized for large or many parallel PDF operations. Instead of resizing one big array, it grows by adding fixed‑size blocks only when needed. This keeps allocations smaller and steadier, helps the GC, and maintains predictable performance as documents scale. Compared to MemoryStream (which resizes one contiguous array and copies data on expansion), this segmented approach adds fixed blocks without copying existing bytes, reducing large reallocations and LOH pressure for very large or unpredictable workloads. The block‑based design grows incrementally without moving existing bytes and supports very large content sizes while keeping allocation behavior stable under parallel load. + +## Why a Segmented Approach + +Large PDF generation often needs a temporary buffer. A normal contiguous array may reallocate and copy data multiple times as it expands, increasing CPU work, peak memory, and pressure on the Large Object Heap (LOH). Avoiding large contiguous allocations lowers fragmentation, reduces garbage collection pauses, and scales better when size is unpredictable or workloads are bursty. + +## How It Works + +Data lives in equal‑sized blocks held in order. When more space is required a single new block is allocated, earlier blocks stay untouched. A position maps to (block index, offset). Growing exposes cleared bytes ready for writing. Shrinking lowers only the visible length and retains the blocks so later growth can reuse already allocated memory without new large allocations. + +## When to Use + +Use it when you need to: + +- Build or merge large PDFs fully in memory before saving. +- Combine many pieces where the final size is unknown. +- Run multiple document builds in parallel and want steady, predictable allocations. +- Seek and rewrite parts of the buffered content without triggering array growth copies. + +## Example + +The following example shows two common ways to load a large PDF document into memory before further processing. The first approach constructs the stream directly from a byte array and passes an explicit segment size (bufferSize). The second approach creates an empty instance and copies a file stream into it. The constructor's second parameter (bufferSize) is optional and defaults to 1,000,000 bytes (1 MB). You can omit it unless you want a different segment size. + + + +In both cases the segmented internal structure avoids reallocating a single large contiguous buffer, helping performance and memory stability for very large PDF files. + + From f2ae5cb215bf77851db8f6d6121c897924a47297 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Mon, 6 Oct 2025 18:31:36 +0300 Subject: [PATCH 08/13] ExpandableMemoryStream config. --- _config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_config.yml b/_config.yml index c195db52..a508439b 100644 --- a/_config.yml +++ b/_config.yml @@ -252,6 +252,9 @@ navigation: libraries/radpdfprocessing/formats-and-conversion/pdf/pdfstreamwriter: title: PdfStreamWriter position: 2 + libraries/radpdfprocessing/formats-and-conversion/pdf/expandablememorystream: + title: ExpandableMemoryStream + position: 3 libraries/radpdfprocessing/formats-and-conversion/plain-text: title: Plain Text position: 0 From 11f5700a64ebf0ff08f2378132c4f63ba45c3cb0 Mon Sep 17 00:00:00 2001 From: Desislava Yordanova Date: Wed, 8 Oct 2025 08:01:55 +0300 Subject: [PATCH 09/13] zugferd code snippet added to the docs solution --- .../embedded-file-streams/zugferd-invoices.md | 37 ++----------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/libraries/radpdfprocessing/features/embedded-file-streams/zugferd-invoices.md b/libraries/radpdfprocessing/features/embedded-file-streams/zugferd-invoices.md index 878bb91f..5779cbba 100644 --- a/libraries/radpdfprocessing/features/embedded-file-streams/zugferd-invoices.md +++ b/libraries/radpdfprocessing/features/embedded-file-streams/zugferd-invoices.md @@ -18,27 +18,7 @@ position: 1 #### **[C#] Add ZUGFeRD invoice** -{{region cs-radpdfprocessing-embedded-file-add-zugferd-invoice}} - - RadFixedDocument document = new RadFixedDocument(); - using (RadFixedDocumentEditor editor = new RadFixedDocumentEditor(document)) - { - editor.CharacterProperties.TrySetFont(new System.Windows.Media.FontFamily("Calibri")); - editor.InsertRun("PDF/A-3B Compliant Invoice"); - }; - byte[] bytes = File.ReadAllBytes(@"zugferd-invoice.xml"); - document.EmbeddedFiles.AddZugferdInvoice(bytes); - - PdfFormatProvider provider = new PdfFormatProvider(); - PdfExportSettings settings = new PdfExportSettings(); - settings.ComplianceLevel = PdfComplianceLevel.PdfA3B; - provider.ExportSettings = settings; - using (Stream output = File.OpenWrite("exportedInvoice.pdf")) - { - provider.Export(document, output); - } - -{{endregion}} + >note Only a single XML invoice attachment is allowed according to the ZUGFeRD standard. @@ -46,14 +26,7 @@ position: 1 #### **[C#] Remove ZUGFeRD invoice** -{{region cs-radpdfprocessing-embedded-file-remove-zugferd-invoice}} - - if (document.EmbeddedFiles.ContainsZugferdInvoice) - { - document.EmbeddedFiles.RemoveZugferdInvoice(); - } - -{{endregion}} + ## ZugferdConformanceLevel @@ -66,8 +39,6 @@ RadPdfProcessing offers the functionality to specify the **ZugferdConformanceLev * **Comfort**: The comfort profile with richer structured content, typically aligned with common business requirements to enable advanced automation. * **Extended**: The most comprehensive profile including extended data elements to cover advanced or industry-specific scenarios beyond the comfort profile. -```` -RadFixedDocument document = new RadFixedDocument(); -document.EmbeddedFiles.AddZugferdInvoice(File.ReadAllBytes(@"zugferd-invoice.xml"), ZugferdConformanceLevel.Comfort); -```` + + From d394d77ee304f97f5af8dcda73b2a6ce316cb7b6 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Wed, 8 Oct 2025 11:39:08 +0300 Subject: [PATCH 10/13] Auto fit text in a stamp annotation KB. --- ...-text-stamp-annotation-radpdfprocessing.md | 148 ++++++++++++++++++ .../stamp-auto-fitted-multiline-text.png | Bin 0 -> 8375 bytes 2 files changed, 148 insertions(+) create mode 100644 knowledge-base/fit-multiline-text-stamp-annotation-radpdfprocessing.md create mode 100644 knowledge-base/images/stamp-auto-fitted-multiline-text.png diff --git a/knowledge-base/fit-multiline-text-stamp-annotation-radpdfprocessing.md b/knowledge-base/fit-multiline-text-stamp-annotation-radpdfprocessing.md new file mode 100644 index 00000000..c586652e --- /dev/null +++ b/knowledge-base/fit-multiline-text-stamp-annotation-radpdfprocessing.md @@ -0,0 +1,148 @@ +--- +title: Fit Multiline Text Inside a Custom Stamp Annotation in PDFs with RadPdfProcessing +description: Learn how to measure and fit multiline text inside the fixed rectangle of a custom StampAnnotation by calculating the optimal font size. +type: how-to +page_title: Fit Multiline Text Inside a Custom Stamp Annotation in PDFs with RadPdfProcessing +meta_title: Fit Multiline Text Inside a Custom Stamp Annotation in PDFs with RadPdfProcessing +slug: fit-multiline-text-stamp-annotation-radpdfprocessing +tags: pdf, stamp, annotation, font, size, multiline, measure, text, appearance, autosize, fit, aouto, fixed, editor, auto +res_type: kb +--- + +## Environment + +| Version | Product | Author | +| ---- | ---- | ---- | +| 2025.3.806 | RadPdfProcessing | [Yoan Karamanov](https://www.telerik.com/blogs/author/yoan-karamanov) | + +## Description + +This article shows how to render multiple lines of text so they fit inside the fixed rectangle of a custom [StampAnnotation]({%slug radpdfprocessing-model-annotations-stamp%}) by dynamically determining the maximum usable font size. Unlike predefined stamp names, a custom stamp appearance requires supplying a visual form (a **FormSource**) that draws both background styling and text content. + +>important When using a custom name (not one of the predefined **StampAnnotationPredefinedNames**), it is recommended to prefix the name with **#** (e.g., **#CustomStamp**) so external PDF viewers (like Adobe Acrobat) don't overwrite the custom appearance if the stamp is moved. + +## Solution + +To fit multiline text inside a stamp rectangle: + +1. Create a **StampAnnotation** with a fixed **Rect** on a page. +2. Build a custom **FormSource** that will serve as the annotation's appearance (**Content.NormalContentSource**). +3. Measure each line by incrementally increasing the font size in a **Block** until the rendered dimensions exceed the available width/height and keep the maximum size that fits. +4. Use the minimum of all line-specific maximum sizes so every line fits within the rectangle. +5. Draw a decorative background (border, fill, dash pattern) and then render each line vertically stacked. +6. Export the document to PDF. + +![Stamp With Auto-Fitted Multiline Text](images/stamp-auto-fitted-multiline-text.png) + +Below is a complete example demonstrating these steps. + +#### [C#] Measure and Fit Multiline Text in a StampAnnotation + +```csharp +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using Telerik.Documents.Primitives; +using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf; +using Telerik.Windows.Documents.Fixed.Model; +using Telerik.Windows.Documents.Fixed.Model.Annotations; +using Telerik.Windows.Documents.Fixed.Model.ColorSpaces; +using Telerik.Windows.Documents.Fixed.Model.Editing; +using Telerik.Windows.Documents.Fixed.Model.Resources; + +List lines = new List() { "1st line", "second line", "3rd line",}; +RadFixedDocument document = CreateTextAnnotation(lines); + +string exportFileName = "StampAnnotation.pdf"; +File.Delete(exportFileName); +using (Stream output = File.OpenWrite(exportFileName)) +{ + PdfFormatProvider provider = new PdfFormatProvider(); + provider.Export(document, output, TimeSpan.FromSeconds(20)); +} + +Process.Start(new ProcessStartInfo +{ + FileName = exportFileName, + UseShellExecute = true +}); + +RadFixedDocument CreateTextAnnotation(List lines) +{ + RadFixedDocument radFixedDocument = new RadFixedDocument(); + RadFixedPage page = radFixedDocument.Pages.AddPage(); + + StampAnnotation stampAnnotation = page.Annotations.AddStamp(new Rect(100, 100, 100, 100)); + stampAnnotation.Name = "#Test"; + + FormSource annotationForm = CreateContentFormWithText(stampAnnotation.Rect, lines); + stampAnnotation.Content.NormalContentSource = annotationForm; + + return radFixedDocument; +} + +static FormSource CreateContentFormWithText(Rect stampRectangle, List lines) +{ + FormSource textForm = new FormSource(); + textForm.Size = new Size(stampRectangle.Width, stampRectangle.Height); + + FixedContentEditor textFormEditor = new FixedContentEditor(textForm); + + using (textFormEditor.SaveProperties()) + { + textFormEditor.GraphicProperties.IsFilled = true; + textFormEditor.GraphicProperties.IsStroked = true; + textFormEditor.GraphicProperties.StrokeThickness = 2; + textFormEditor.GraphicProperties.StrokeColor = new RgbColor(92, 229, 0); + textFormEditor.GraphicProperties.FillColor = new RgbColor(213, 222, 226); + textFormEditor.GraphicProperties.StrokeDashArray = new double[] { 17, 4 }; + textFormEditor.DrawRectangle(new Rect(textFormEditor.Position.Matrix.OffsetX, textFormEditor.Position.Matrix.OffsetY, stampRectangle.Width, stampRectangle.Height)); + } + + double calculatedFontSize = MeasureFontSize(textForm, textFormEditor, lines); + textFormEditor.TextProperties.FontSize = calculatedFontSize; + + double offset = 0; + foreach (string line in lines) + { + textFormEditor.Position.Translate(0, offset); + textFormEditor.DrawText(line); + offset += calculatedFontSize; + } + + return textForm; +} + +static double MeasureFontSize(FormSource textForm, FixedContentEditor formEditor, List lines) +{ + List fontSizes = new List(); + + foreach (string line in lines) + { + double fontSize = 0; + Size textSize = Size.Empty; + Block block = new Block(); + block.TextProperties.Font = formEditor.TextProperties.Font; + while (textSize.Width < textForm.Size.Width && textSize.Height < textForm.Size.Height) + { + block.TextProperties.FontSize = ++fontSize; + block.InsertText(line); + textSize = block.Measure(); + block.Clear(); + } + + fontSizes.Add(fontSize); + } + + return fontSizes.Min(); +} +``` + +## See Also + +- [Stamp Annotation]({%slug radpdfprocessing-model-annotations-stamp%}) +- [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) +- [FormSource Overview]({%slug radpdfprocessing-model-formsource-overview%}) +- [PdfProcessing Overview]({%slug radpdfprocessing-overview%}) diff --git a/knowledge-base/images/stamp-auto-fitted-multiline-text.png b/knowledge-base/images/stamp-auto-fitted-multiline-text.png new file mode 100644 index 0000000000000000000000000000000000000000..84392e9f7d205c4c9fe632d33b3713b82bb2de73 GIT binary patch literal 8375 zcmb7~MN}MIkcH94-5L$v1lPtPH16&McXtUE9D+lFyEpCxcXvtf;10pvCjVx3vzSHQ zI`2E@)wb%sdQmD$(io^Ds4y@v7_u@FYX7qPe}N46ry3cApnnO)Sw`0l1_ll9zkr3w z$O8U@ux@J75SZ#IvZH?o1S>H`F&LP-c(fN2L>L%K1z8C(4R6@9&q&_*nu`IY_9#@L zGdvo_{`gc2#t*1U| z{U%&gFfW=*Im@ck#`Uj}=0S6A88Ar~~$wn36rS3b3#@s2ah~AumR0k0eo6jOtF%XFPOh zq3QAod{oYFV*B z916stImoIX)`Uh#C>UkKzP(9}w6fVVe5_l#zV?gptEcKC5e>iCSDZ0<@U#CG)ldGT z+=-K=#gx7MvzxoO6-PBLhO>uHpgX!lh}Yr(u4ERHgA$@mp_R2A=hUYcVCs~oNM-4T z_y%a^_$YnJmx)|E&c0_GCmWk^4yG!j1(FNhFjZcwvd?M$bkk(o6=RmEO<90+#1(q6 z5pyBBjb_iE1yiBt{O6!s)*w$J!PFQCa9EGuz@+H^D=uAUb_V3;S{fOfcGOZYlx_7# zmf!dr)!R>lom~kPrmiI=E!`@7J2%}v?oKSQJyyjymm~cedOy^{eBBQN}b1 zDub70tQ`-hOeP29Md5c9{x*7JIIME8R z4(X_9stm^!<%$B!=!G2>HW$A1&^@HHj`fG;ZglkzPiqI!1&|ZIdXu#fbOAL_BwqyV zsI^{9#IkvZcA`Cek$yjW6V>+<$H}DaRBdc zD%V~)`)}WRp+y>L69W%*(d-L;#Mk$);r#36cwBlOtoY5O%fYIs>~95w(YvVLr*-AX zd4dUdPNilEgBsPiwumUTxvgLApyr9?ga*$C*l*mak|9baWhN>nJeerxmT9BIrcM1S zQ2OKVS_!}=B#`53BZJK>C9x0Pk7E{5p%owYp`3Sgvu=tA9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o0i+H>TI#Xt*ig8@Gf3iYNB$Up_E9_7ve{RV~hU}FsM#Vz)C%_*zMo@ciFl1UzL9- z=^vu|525^rss`l=yk>ql%!y<}W(} zD|JfWnA8%R|F+~r67NDcsX3QUda?86e}XFkJ;e*6c$J~1z$w#?j_^tvOPR31nv Date: Wed, 8 Oct 2025 17:13:54 +0300 Subject: [PATCH 11/13] Update document-themes.md --- .../concepts/document-themes.md | 122 +++++++++++++++--- 1 file changed, 104 insertions(+), 18 deletions(-) diff --git a/libraries/radwordsprocessing/concepts/document-themes.md b/libraries/radwordsprocessing/concepts/document-themes.md index 70741a87..8c7aa8fb 100644 --- a/libraries/radwordsprocessing/concepts/document-themes.md +++ b/libraries/radwordsprocessing/concepts/document-themes.md @@ -1,5 +1,6 @@ --- title: Document Themes +description: Learn how to use document themes in Telerik Document Processing to apply consistent colors and fonts across your documents. Explore color schemes, font schemes, ThemableColor and ThemableFontFamily objects, and how to dynamically resolve actual values based on the current theme. page_title: Document Themes slug: radwordsprocessing-concepts-document-themes tags: document,themes @@ -9,11 +10,8 @@ position: 3 # Document Themes - - Document themes enable you to specify colors, fonts and a variety of graphic effects in a document and affect the look and feel of the whole document. Each theme contains a color scheme and a font scheme and is represented by the __DocumentTheme__ class and can be modified by the __Theme__ property of [RadFlowDocument]({%slug radwordsprocessing-model-radflowdocument%}). Document theme contains two parts – color scheme – responsible for the colors, and font scheme – responsible for the fonts. - * [Color Schemes](#color-schemes) * [Font Schemes](#font-schemes) @@ -24,8 +22,7 @@ Document themes enable you to specify colors, fonts and a variety of graphic eff ## Color Schemes -A color scheme has a unique name and contains a number of predefined colors. Its representation in __RadFlowDocument__'s model is the __ThemeColorScheme__ class. A scheme defines twelve colors and each of these is assigned a sole __ThemeColorType__. The following list contains all __ThemeColorType__ values: - +A color scheme has a unique name and contains a number of predefined colors. Its representation in __RadFlowDocument__'s model is the __ThemeColorScheme__ class. A scheme defines twelve colors and each of these is assigned a sole __ThemeColorType__. The following list contains all __ThemeColorType__ values: * background1 * text1 @@ -145,8 +142,7 @@ When you need to create a font that depends on the current document theme, you n ## Document Themes -Now that you have a color and a font schemes, you can create a new __DocumentTheme__. You need to specify a name and pass the already created color and font schemes. - +Now that you have a color and a font schemes, you can create a new __DocumentTheme__. You need to specify a name and pass the already created color and font schemes. #### __[C#] Example 5: Create a DocumentTheme object__ @@ -155,10 +151,7 @@ Now that you have a color and a font schemes, you can create a new __DocumentThe DocumentTheme theme = new DocumentTheme("Mine", colorScheme, fontScheme); {{endregion}} - - -There are a number of predefined color and font schemes. You can find them in a static class called [PredefinedThemeSchemes](https://docs.telerik.com/devtools/document-processing/api/Telerik.Windows.Documents.Spreadsheet.Theming.PredefinedThemeSchemes.html). The class exposes the properties __ColorSchemes__ and __FontSchemes__ that hold all predefined schemes. - +There are a number of predefined color and font schemes. You can find them in a static class called [PredefinedThemeSchemes](https://docs.telerik.com/devtools/document-processing/api/Telerik.Windows.Documents.Spreadsheet.Theming.PredefinedThemeSchemes.html). The class exposes the properties __ColorSchemes__ and __FontSchemes__ that hold all predefined schemes. #### __[C#] Example 6: Using a predefined scheme__ @@ -167,11 +160,8 @@ There are a number of predefined color and font schemes. You can find them in a DocumentTheme theme1 = new DocumentTheme("From Predefined schemes", PredefinedThemeSchemes.ColorSchemes[0], PredefinedThemeSchemes.FontSchemes[5]); {{endregion}} - - Changing the current document theme is as easy as setting a single property. - #### __[C#] Example 7: Change the document theme__ {{region cs-radwordsprocessing-concepts-document-themes_6}} @@ -179,7 +169,106 @@ Changing the current document theme is as easy as setting a single property. document.Theme = theme; {{endregion}} - +## Predefined ThemeColorSchemes + +The table includes all 42 predefined theme color schemes with their corresponding color values for each color category (Background 1, Text 1, Background 2, Text 2, Accent 1-6, Hyperlink, and Followed Hyperlink). + +| Theme Name | Background 1 | Text 1 | Background 2 | Text 2 | Accent 1 | Accent 2 | Accent 3 | Accent 4 | Accent 5 | Accent 6 | Hyperlink | Followed Hyperlink | +|------------|--------------|--------|--------------|--------|----------|----------|----------|----------|----------|----------|-----------|-------------------| +| Office | | | | | | | | | | | | | +| Office 2007 - 2010 | | | | | | | | | | | | | +| Grayscale | | | | | | | | | | | | | +| Adjacency | | | | | | | | | | | | | +| Angels | | | | | | | | | | | | | +| Apex | | | | | | | | | | | | | +| Apothecary | | | | | | | | | | | | | +| Aspect | | | | | | | | | | | | | +| Austin | | | | | | | | | | | | | +| Black Tie | | | | | | | | | | | | | +| Civic | | | | | | | | | | | | | +| Clarity | | | | | | | | | | | | | +| Composite | | | | | | | | | | | | | +| Concourse | | | | | | | | | | | | | +| Couture | | | | | | | | | | | | | +| Elemental | | | | | | | | | | | | | +| Equity | | | | | | | | | | | | | +| Essential | | | | | | | | | | | | | +| Executive | | | | | | | | | | | | | +| Flow | | | | | | | | | | | | | +| Foundry | | | | | | | | | | | | | +| Grid | | | | | | | | | | | | | +| Hardcover | | | | | | | | | | | | | +| Horizon | | | | | | | | | | | | | +| Median | | | | | | | | | | | | | +| Metro | | | | | | | | | | | | | +| Module | | | | | | | | | | | | | +| Newsprint | | | | | | | | | | | | | +| Opulent | | | | | | | | | | | | | +| Oriel | | | | | | | | | | | | | +| Origin | | | | | | | | | | | | | +| Paper | | | | | | | | | | | | | +| Perspective | | | | | | | | | | | | | +| Pushpin | | | | | | | | | | | | | +| Slipstream | | | | | | | | | | | | | +| Solstice | | | | | | | | | | | | | +| Technic | | | | | | | | | | | | | +| Thatch | | | | | | | | | | | | | +| Trek | | | | | | | | | | | | | +| Urban | | | | | | | | | | | | | +| Verve | | | | | | | | | | | | | +| Waveform | | | | | | | | | | | | | + + +### Predefined ThemeFontSchemes + +RadWordsProcessing offers a set of predefined ThemeFontSchemes listed in the table below: + +|Theme Name|Major Font|Minor Font| +|----|----|----| +| Office | Calibri Light | Calibri | +| Office 2007 - 2010 | Cambria | Calibri | +| Office 2 | Calibri | Cambria | +| Office Classic | Arial | Times New Roman | +| Office Classic 2 | Arial | Arial | +| Adjacency | Cambria | Calibri | +| Angels | Franklin Gothic Medium | Franklin Gothic Book | +| Apex | Lucida Sans | Book Antiqua | +| Apothecary | Book Antiqua | Century Gothic | +| Aspect | Verdana | Verdana | +| Austin | Century Gothic | Century Gothic | +| Black Tie | Garamond | Garamond | +| Civic | Georgia | Georgia | +| Clarity | Arial | Arial | +| Composite | Calibri | Calibri | +| Concourse | Lucida Sans Unicode | Lucida Sans Unicode | +| Couture | Garamond | Garamond | +| Elemental | Palatino Linotype | Palatino Linotype | +| Equity | Franklin Gothic Book | Perpetua | +| Essential | Arial Black | Arial | +| Executive | Century Gothic | Palatino Linotype | +| Flow | Calibri | Constantia | +| Foundry | Rockwell | Rockwell | +| Grid | Franklin Gothic Medium | Franklin Gothic Medium | +| Hardcover | Book Antiqua | Book Antiqua | +| Horizon | Arial Narrow | Arial Narrow | +| Median | Tw Cen MT | Tw Cen MT | +| Metro | Consolas | Corbel | +| Module | Corbel | Corbel | +| Newsprint | Impact | Times New Roman | +| Opulent | Trebuchet MS | Trebuchet MS | +| Oriel | Century Schoolbook | Century Schoolbook | +| Origin | Bookman Old Style | Gill Sans MT | +| Paper | Constantia | Constantia | +| Perspective | Arial | Arial | +| Pushpin | Constantia | Franklin Gothic Book | +| Slipstream | Trebuchet MS | Trebuchet MS | +| Solstice | Gill Sans MT | Gill Sans MT | +| Technic | Franklin Gothic Book | Arial | +| Thatch | Tw Cen MT | Tw Cen MT | +| Trek | Franklin Gothic Medium | Franklin Gothic Book | +| Urban | Trebuchet MS | Georgia | +| Verve | Century Gothic | Century Gothic | +| Waveform | Candara | Candara | ## Getting Actual Values @@ -194,7 +283,6 @@ In order to get the actual value from __ThemableColor__ or __ThemableFontFamily_ {{endregion}} - #### __[C#] Example 9: Get actual value from ThemableFont__ {{region cs-radwordsprocessing-concepts-document-themes_8}} @@ -202,8 +290,6 @@ In order to get the actual value from __ThemableColor__ or __ThemableFontFamily_ // The actualFont is the same as the Major font of the fontScheme. {{endregion}} - - ## See Also * [RadFlowDocument]({%slug radwordsprocessing-model-radflowdocument%}) From 0fe2683aed65c7ac82045a0a215202a727dbdff2 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Tue, 14 Oct 2025 11:18:36 +0300 Subject: [PATCH 12/13] KB: Runtime Diagnostics - Showcase (85553) --- .../runtime-licensing-diagnostics.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 knowledge-base/runtime-licensing-diagnostics.md diff --git a/knowledge-base/runtime-licensing-diagnostics.md b/knowledge-base/runtime-licensing-diagnostics.md new file mode 100644 index 00000000..f90711ed --- /dev/null +++ b/knowledge-base/runtime-licensing-diagnostics.md @@ -0,0 +1,77 @@ +--- +title: Runtime Licensing Diagnostics +description: Step-by-step walkthrough of using Telerik.Licensing runtime diagnostics to investigate unexpected watermarks across web, plugin, and desktop scenarios. +type: how-to +page_title: Runtime Licensing Diagnostics +meta_title: Runtime Licensing Diagnostics +slug: runtime-licensing-diagnostics +tags: licensing, diagnostics, runtime, watermark, plugins, webforms, aspnet, blazor, wpf, winforms, license, key, register +ticketid: 1697496 +res_type: kb +--- + +## Environment + +| Version | Product(s) | Author | +| ---- | ---- | ---- | +| 2025.3.806 | Document Processing & Telerik UI |[Yoan Karamanov](https://www.telerik.com/blogs/author/yoan-karamanov)| + +## Description + +In certain environments an application may still show a trial watermark (or trial sheet) **at runtime** even though everything looked correct at **build time**: + +* Valid **telerik-license.txt** file is present. +* Build logs indicate Telerik products detected (class library and executable). +* No licensing build errors are reported. + +Yet the rendered UI (document, control, page) contains a watermark. + +These issues surface mainly in two categories: + +1. **Web products (ASP.NET AJAX, MVC, Core, Blazor)** – Incorrect script load order or duplicate script imports where one import overrides a previously applied license. +2. **.NET applications with extensibility / plugins (WPF, WinForms, class libraries, host wrappers)** - The entry assembly at runtime differs (e.g. a host like **SentinelDotNetFx.dll**), changing the licensing evaluation path. + +Runtime diagnostics in **Telerik.Licensing** help correlate what the licensing engine sees (entry assembly, loaded assemblies, product metadata, license evidences) with the final **IsLicenseValid** result. + +## Solution + +### 1. Enable Diagnostics Early +Call **Telerik.Licensing.TelerikLicensing.EnableDiagnostics();** **as early as possible**, before any Telerik UI controls or Document Processing code is first reached/loaded. + +### 2. Plugin / Non-Standard Entry Scenarios +If the code runs as a plugin or a dynamically loaded context (no traditional entry assembly, or an unexpected wrapper assembly), call **TelerikLicensing.Register()** **after** enabling diagnostics to provision runtime script keys. + +### 3. Execute +Trigger the Telerik code so the licensing pipeline executes. + +### 4. Collect the Log +Read the accumulated diagnostics text from **Telerik.Licensing.TelerikLicensing.Diagnostics** and persist it (file, console). The log grows for the life of the process (restart to clear). + +### 5. Analyze Key Sections +Look for: +- Entry assembly (**Assembly.GetEntryAssembly()**) +- Product metadata extraction (**ProductMetadataForAssembly ...**) +- License evidences (subscription / perpetual tokens) +- Final resolution line (**Resolved: IsLicenseValid: ...**) + +### 6. Disable When Done +Diagnostics add overhead and should not remain enabled indefinitely in production. + +### Performance & Operational Notes +- Diagnostics add measurable overhead. Use only during investigation. +- Log size grows monotonically until process restart. +- Capture the log after reproducing the watermark; then disable diagnostics. + +## See Also + +* [License Activation Errors and Warnings]({%slug activation-errors-and-warnings%}) +* [Adding the License Key to CI Services]({%slug adding-license-key-ci-cd-services%}) +* [License Key FAQ]({%slug frequently-asked-questions%}) +* [License Agreement]({%slug license-agreement%}) +* [Redistributing Telerik Document Processing]({%slug installation-deploying-telerik-document-processing%}) +* [Unable to find package Telerik.Licensing]({%slug dpl-package-update-failure-license%}) +* [Handling License Key File Name and Environment Variable Name Changes in the 2025 Q1 Release]({%slug handling-license-file-name-changes%}) +* [Telerik.Licensing NuGet package is not available on the Telerik NuGet feed]({%slug dpl-telerik-licensing-nuget-feed%}) +* [Diagnostic Options for Telerik Licensing]({%slug telerik-trial-version-message-diagnostic-options%}) +* [Resolving License Validation Issues in Telerik Document Processing Libraries]({%slug license-not-recognized-telerik-document-processing-libraries%}) +* [Telerik License Approaches](https://github.com/LanceMcCarthy/DevOpsExamples?tab=readme-ov-file#telerik-license-approaches) From d4d4699827702fad992b79d2748ea4fa4cda1bcf Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Thu, 16 Oct 2025 11:47:06 +0300 Subject: [PATCH 13/13] Replace Assemblies with NuGet Packages - Getting Started + Introduciton sections. --- .../Installation/install-nuget-packages.md | 2 +- .../installing-on-your-computer.md | 8 +- .../Installation/nuget-packages.md | 12 +-- getting-started/Installation/pdf-export.md | 6 +- getting-started/first-steps.md | 26 +++--- getting-started/getting-started.md | 82 +++++++++---------- introduction.md | 6 +- 7 files changed, 71 insertions(+), 71 deletions(-) diff --git a/getting-started/Installation/install-nuget-packages.md b/getting-started/Installation/install-nuget-packages.md index 5880eb6d..bca56e40 100644 --- a/getting-started/Installation/install-nuget-packages.md +++ b/getting-started/Installation/install-nuget-packages.md @@ -40,7 +40,7 @@ This article describes how you can install the Document Processing Libraries usi > >* A version for __.Net Standard 2.0__ > ->Both versions are available as NuGet packages but with different names. The assemblies for __.NET Standard__ do __not__ contain the word __Windows__ in their name. +>Both versions are available as NuGet packages but with different names. The packages for __.NET Standard__ do __not__ contain the word __Windows__ in their name. ## Download from the NuGet server diff --git a/getting-started/Installation/installing-on-your-computer.md b/getting-started/Installation/installing-on-your-computer.md index a2fb3037..cebcaf82 100644 --- a/getting-started/Installation/installing-on-your-computer.md +++ b/getting-started/Installation/installing-on-your-computer.md @@ -14,9 +14,9 @@ position: 5 Telerik Document Processing is part of several Telerik bundles and is installed following the steps for installing the suite with which you've obtained the product. ->Starting from Q1 2016, the Document Processing assemblies have an assembly version which may differ from the assembly version of the other assemblies in the particular suite. +>Starting from Q1 2016, the Document Processing packages have a package version which may differ from the package version of the other packages in the particular suite. > ->Starting from R3 2016, only assemblies with a version number ending with .40 suffix are distributed. The libraries don't contain code specific for .NET Framework 4.5, thus an additional version is not needed. +>Starting from R3 2016, only packages with a version number ending with .40 suffix are distributed. The libraries don't contain code specific for .NET Framework 4.5, thus an additional version is not needed. > >The changes are synced between the controls that have a dependency on Telerik Document Processing and while the referenced files are from the same release, they should work as expected regardless of the version distinction. @@ -30,13 +30,13 @@ The libraries can be used through the available NuGet packages. [Installing Telerik UI for ASP.NET AJAX](http://docs.telerik.com/devtools/aspnet-ajax/installation/which-file-do-i-need-to-install) -When the installation completes, the Telerik Document Processing assemblies will be available in the *AdditionalLibraries* sub-folder. +When the installation completes, the Telerik Document Processing packages will be available in the *AdditionalLibraries* sub-folder. ## UI for ASP.NET MVC [Installing Telerik UI for ASP.NET MVC](https://docs.telerik.com/aspnet-mvc/getting-started/installation/overview) -When the installation completes, the Telerik Document Processing assemblies will be available in the *spreadsheet* sub-folder. +When the installation completes, the Telerik Document Processing packages will be available in the *spreadsheet* sub-folder. ## UI for Blazor diff --git a/getting-started/Installation/nuget-packages.md b/getting-started/Installation/nuget-packages.md index 65f088cb..27057663 100644 --- a/getting-started/Installation/nuget-packages.md +++ b/getting-started/Installation/nuget-packages.md @@ -3,7 +3,7 @@ title: Available NuGet Packages page_title: Available NuGet Packages description: Learn how you can use the Telerik Document Processing libraries through NuGet. slug: available-nuget-packages -tags: nuget, document, processing, assembly +tags: nuget, document, processing, assembly, package published: True position: 6 --- @@ -27,7 +27,7 @@ If your workflow relies on NuGet for package management, you can take advantage > >* A version for __.Net Standard 2.0__ > ->Both versions are available as NuGet packages but with different names. The assemblies for __.NET Standard__ do __not__ contain the word __Windows__ in their name. +>Both versions are available as NuGet packages but with different names. The packages for __.NET Standard__ do __not__ contain the word __Windows__ in their name. >caption Package lists to use with .NET Standard (left) and .NET Framework (right) @@ -43,8 +43,8 @@ The following list represents the available NuGet packages for the Document Proc * __Telerik.Windows.Documents.Core:__ The main NuGet package for the Telerik Document Processing libraries. Required when you plan to use the library. * __Telerik.Windows.Documents.Fixed:__ The package is required when processing `PDF` documents. -* __Telerik.Windows.Documents.Fixed.FormatProviders.Ocr:__ This assembly is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. -* __Telerik.Windows.Documents.Tesseract.Ocr:__ This assembly is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. +* __Telerik.Windows.Documents.Fixed.FormatProviders.Ocr:__ This package is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. +* __Telerik.Windows.Documents.Tesseract.Ocr:__ This package is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. * __Telerik.Windows.Documents.CMapUtils:__ Provides a default implementation for getting the data of a predefined CMap table by a given name. * __Telerik.Windows.Documents.Flow:__ The package is part of the WordsProcessing library. Required for processing `HTML`, `DOCX`, `RTF`, and `TXT` documents. * __Telerik.Windows.Documents.DrawingML:__ Part of the WordsProcessing library. It is needed for working with shapes inside the documents. @@ -63,8 +63,8 @@ The following list represents the available NuGet packages for the Document Proc * __Telerik.Documents.Core:__ The main NuGet package from the Telerik Document Processing libraries. Required when you plan to use the library. * __Telerik.Documents.Fixed:__ The package is required when processing `PDF` documents. -* __Telerik.Documents.Fixed.FormatProviders.Ocr:__ This assembly is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. -* __Telerik.Documents.Tesseract.Ocr:__ This assembly is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. +* __Telerik.Documents.Fixed.FormatProviders.Ocr:__ This package is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. +* __Telerik.Documents.Tesseract.Ocr:__ This package is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. * __Telerik.Documents.ImageUtils:__ This package is required when exporting to `PDF` format a document containing images different than Jpeg and Jpeg2000 or ImageQuality different than High. For more information check the [PdfProcessing`s Cross-Platform Support]({%slug radpdfprocessing-cross-platform%}) article. * __Telerik.Documents.CMapUtils:__ Provides a default implementation for getting the data of a predefined CMap table by a given name. * __Telerik.Documents.Flow:__ The package is part of the Words Processing Library. Required for processing `HTML`, `DOCX`, `RTF`, and `TXT` documents. diff --git a/getting-started/Installation/pdf-export.md b/getting-started/Installation/pdf-export.md index 2703086e..9b9db899 100644 --- a/getting-started/Installation/pdf-export.md +++ b/getting-started/Installation/pdf-export.md @@ -24,7 +24,7 @@ Depending on the scenario, you could take advantage of the different functionali ## Create a PDF Document From Scratch -**RadPdfProcessing** is intended to work with fixed documents and provides a convenient API to create, modify and export PDF documents. To use its import and export functionalities, you will need to add a reference to the **Telerik.Windows.Documents.Fixed** assembly. +**RadPdfProcessing** is intended to work with fixed documents and provides a convenient API to create, modify and export PDF documents. To use its import and export functionalities, you will need to add a reference to the **Telerik.Windows.Documents.Fixed** package. You can import and export a document through the respective methods of the **PdfFormatProvider** class. @@ -34,7 +34,7 @@ You can import and export a document through the respective methods of the **Pdf In scenarios where you need to convert a document from another file format to PDF, you could take advantage of the capabilities of **RadWordsProcessing**. This library allows you to import documents from the most common rich text formats (Docx, HTML, RTF) as well as plain text and export them to PDF. All the supported document formats and the corresponding format providers are listed in the [Formats and Conversion section]({%slug radwordsprocessing-formats-and-conversion%}). -In order to use the **PdfFormatProvider** of **RadWordsProcessing**, you should add a reference to the **Telerik.Windows.Documents.Flow.FormatProviders.Pdf** assembly. +In order to use the **PdfFormatProvider** of **RadWordsProcessing**, you should add a reference to the **Telerik.Windows.Documents.Flow.FormatProviders.Pdf** package. >The **PdfFormatProvider** class of RadWordsProcessing resides in the **Telerik.Windows.Documents.Flow.FormatProviders.Pdf namespace**. For more information on how to work with this provider, please read [this topic]({%slug radwordsprocessing-formats-and-conversion-pdf-pdfformatprovider%}). @@ -63,7 +63,7 @@ In order to use the **PdfFormatProvider** of **RadWordsProcessing**, you should While the so far discussed libraries allow working with text documents, with RadSpreadProcessing you can create, import and export tabular data. This library supports the most common file formats for storing spreadsheet documents - Xlsx, CSV. All format providers are listed and described in the corresponding [Formats and Conversion section]({%slug radspreadprocessing-formats-and-conversion-pdf-pdfformatprovider%}). -In order to enable the export to PDF in RadSpreadProcessing, you will need to add a reference to the **Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf** assembly. +In order to enable the export to PDF in RadSpreadProcessing, you will need to add a reference to the **Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf** package. >The **PdfFormatProvider** class of RadSpreadProcessing resides in the **Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf namespace**. For more information on how to work with this provider, please read [this topic]({%slug radspreadprocessing-formats-and-conversion-pdf-pdfformatprovider%}). diff --git a/getting-started/first-steps.md b/getting-started/first-steps.md index a226e655..e35c97c3 100644 --- a/getting-started/first-steps.md +++ b/getting-started/first-steps.md @@ -17,11 +17,11 @@ The Telerik Document Processing libraries that we use in this guide are UI-indep >important Please install **<PackageReference Include="Telerik.Licensing" Version="1.*" />**. -Since we distribute Telerik Document Processing libraries as an addition to several Telerik UI component bundles, chances are that the libraries are already installed on your system. In this case, all you need is to locate them. The table below provides links to the installation instructions for each of the Telerik UI component suites that give you access to the Telerik Document Processing libraries. If the standard installation of your Telerik UI component suite includes the Document Processing assemblies, the table also shows their default location. +Since we distribute Telerik Document Processing libraries as an addition to several Telerik UI component bundles, chances are that the libraries are already installed on your system. In this case, all you need is to locate them. The table below provides links to the installation instructions for each of the Telerik UI component suites that give you access to the Telerik Document Processing libraries. If the standard installation of your Telerik UI component suite includes the Document Processing packages, the table also shows their default location. ->tipRegardless of the Telerik UI components suite that you use, you can always get the Document Processing assemblies as NuGet packages from the [Telerik NuGet server]({%slug installation-nuget-packages%}). +>tipRegardless of the Telerik UI components suite that you use, you can always get the Document Processing packages as NuGet packages from the [Telerik NuGet server]({%slug installation-nuget-packages%}). -| UI Components suite | Installation instructions | Default location of the Document Processing assemblies | +| UI Components suite | Installation instructions | Default location of the Document Processing packages | |--------------------|---------------------------|------------------------------------------------| | UI for ASP.NET AJAX | [Installing Telerik UI for ASP.NET AJAX](http://docs.telerik.com/devtools/aspnet-ajax/installation/which-file-do-i-need-to-install) |
  • `C:\Program Files (x86)\Progress\Telerik UI for ASP.NET AJAX [version]\AdditionalLibraries\Bin40`
  • `C:\Program Files (x86)\Progress\Telerik UI for ASP.NET AJAX [version]\AdditionalLibraries\Bin45`
| | UI for ASP.NET MVC | [Installing Telerik UI for ASP.NET MVC](http://docs.telerik.com/kendo-ui/aspnet-mvc/introduction#installation) |
  • `C:\Program Files (x86)\Progress\Telerik UI for ASP.NET MVC [version]\dpl\net40`
  • `C:\Program Files (x86)\Progress\Telerik UI for ASP.NET MVC [version]\dpl\netstandard`
| @@ -46,29 +46,29 @@ As we are going to create a UI-Independent example, we will use a console projec ## Step 3: Add a Telerik Document Processing Library to a Project -This sample application will use [RadWordsProcessing]({%slug radwordsprocessing-overview%}). In this step, we must add the required assemblies. +This sample application will use [RadWordsProcessing]({%slug radwordsprocessing-overview%}). In this step, we must add the required packages. -1. Reference the assemblies that provide the __RadWordsProcessing__ functionality: +1. Reference the packages that provide the __RadWordsProcessing__ functionality: For .NET Framework project: - * __Telerik.Windows.Documents.Core.dll__ - * __Telerik.Windows.Documents.Flow.dll__ + * __Telerik.Windows.Documents.Core__ + * __Telerik.Windows.Documents.Flow__ For .NET Standard ({{site.dotnetversions}}) project: - * __Telerik.Documents.Core.dll__ - * __Telerik.Documents.Flow.dll__ + * __Telerik.Documents.Core__ + * __Telerik.Documents.Flow__ >note As of **Q2 2025** the Zip Library will no longer be used as an internal dependency in the rest of the Document Processing Libraries - PdfProcessing, WordsProcessing, SpreadProcessing, SpreadStreamProcessing. It will be replaced by the System.IO.Compression. We will continue to ship the Telerik Zip Library as a standalone library so clients can still use it separately. -1. Reference the assembly that allows you to export the content as a PDF file: +1. Reference the package that allows you to export the content as a PDF file: For .NET Framework project: - * __Telerik.Windows.Documents.Flow.FormatProviders.Pdf.dll__ + * __Telerik.Windows.Documents.Flow.FormatProviders.Pdf__ For .NET Standard ({{site.dotnetversions}}) project: - * __Telerik.Documents.Flow.FormatProviders.Pdf.dll__ + * __Telerik.Documents.Flow.FormatProviders.Pdf__ -> The Document Processing assemblies for {{site.dotnetversions}} don't contain "Windows" in their names. +> The Document Processing packages for {{site.dotnetversions}} don't contain "Windows" in their names. ## Step 4: Create a Document diff --git a/getting-started/getting-started.md b/getting-started/getting-started.md index 35c9081a..84db3e59 100644 --- a/getting-started/getting-started.md +++ b/getting-started/getting-started.md @@ -9,61 +9,61 @@ position: 0 # Getting Started with Telerik Document Processing -**Telerik Document Processing** includes a set of cross-platform libraries that let you import and export content between different document formats and work with archive files. The needed assemblies come with the installation files of several Telerik suites. They are also available in the internal builds of the same Telerik suites. Learn which products include Telerik Document Processing in the [Product Bundles](https://www.telerik.com/purchase.aspx?filter=web). +**Telerik Document Processing** includes a set of cross-platform libraries that let you import and export content between different document formats and work with archive files. The required references come with the installation files of several Telerik suites. They are also available in the internal builds of the same Telerik suites. Learn which products include Telerik Document Processing in the [Product Bundles](https://www.telerik.com/purchase.aspx?filter=web). >tipMore information about the suites that include Telerik Document Processing and how to install them is available in the [Installing on Your Computer]({%slug installation-installing-on-your-computer%}) article. >important Please install **<PackageReference Include="Telerik.Licensing" Version="1.*" />**. -The following tables list all Telerik Document Processing assemblies for the different platforms and their roles: +The following tables list all Telerik Document Processing packages for the different platforms and their roles: ->important The .NET Standard assemblies are compatible with any .NET version (e.g .NET 9), even if there are no assemblies explicitly available for the specific versions. The same applies to the .NET Framework assemblies. +>important The .NET Standard packages are compatible with any .NET version (e.g .NET 9), even if there are no packages explicitly available for the specific versions. The same applies to the .NET Framework packages. -### Assemblies for .NET Standard (Support for {{site.dotnetversions}}) +### Packages for .NET Standard (Support for {{site.dotnetversions}}) -| Assembly Name| Description | +| Packagea Name| Description | |-------|----------------| -| **Telerik.Documents.Core.dll** | The main assembly from the Telerik document processing libraries. You always need it when you intend to use the library. | -| **Telerik.Documents.Flow.dll** | Part of the words (text) processing library. It is needed for processing HTML, DOCX, RTF and TXT documents. | -| **Telerik.Documents.DrawingML.dll** | Part of the words (text) processing library. It is needed for working with shapes inside the documents. | -| **Telerik.Documents.Flow.FormatProviders.Doc.dll** | Allows importing of DOC and DOT document. | -| **Telerik.Documents.Flow.FormatProviders.Pdf.dll** | Allows exporting of flow documents (DOCX, DOC, DOT, RTF, and HTML) to PDF. | -| **Telerik.Documents.Fixed.dll** | Part of the PDF processing library. It is needed for working with PDF documents. | -| **Telerik.Documents.Fixed.FormatProviders.Ocr.dll** | This assembly is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. | -| **Telerik.Documents.Tesseract.Ocr.dll** | This assembly is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. | -| **Telerik.Documents.ImageUtils.dll** | This assembly is required when exporting to `PDF` format a document containing images different than Jpeg and Jpeg2000 or ImageQuality different than High. For more information check the [PdfProcessing`s Cross-Platform Support]({%slug radpdfprocessing-cross-platform%}) article. -| **Telerik.Documents.CMapUtils.dll** | Provides a default implementation for getting the data of a predefined CMap table by a given name. The assembly is optional and you will need to include a reference to it only if you need to process documents with [CMap tables]({%slug radpdfprocessing-concepts-cmap-tables%}). | -| **Telerik.Documents.Spreadsheet.dll** | The main assembly for the spreadsheet processing. It is needed for processing XLSX, CSV, TXT documents. | -| **Telerik.Documents.Spreadsheet.FormatProviders.OpenXml.dll** | This assembly is needed for processing XLSX documents. | -| **Telerik.Documents.Spreadsheet.FormatProviders.Pdf.dll** | This assembly is needed for exporting to PDF documents. | -| **Telerik.Documents.Spreadsheet.FormatProviders.Xls.dll** | This assembly is needed for processing XLS documents. | -| **Telerik.Documents.SpreadsheetStreaming.dll** | The main assembly for generating huge spreadsheet files using minimum resources. | -| **Telerik.Zip.dll** |It is the main assembly of the [Telerik Zip Library]({%slug radziplibrary-overview%}). | +| **Telerik.Documents.Core** | The main package from the Telerik document processing libraries. You always need it when you intend to use the library. | +| **Telerik.Documents.Flow** | Part of the words (text) processing library. It is needed for processing HTML, DOCX, RTF and TXT documents. | +| **Telerik.Documents.DrawingML** | Part of the words (text) processing library. It is needed for working with shapes inside the documents. | +| **Telerik.Documents.Flow.FormatProviders.Doc** | Allows importing of DOC and DOT document. | +| **Telerik.Documents.Flow.FormatProviders.Pdf** | Allows exporting of flow documents (DOCX, DOC, DOT, RTF, and HTML) to PDF. | +| **Telerik.Documents.Fixed** | Part of the PDF processing library. It is needed for working with PDF documents. | +| **Telerik.Documents.Fixed.FormatProviders.Ocr** | This package is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. | +| **Telerik.Documents.Tesseract.Ocr** | This package is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. | +| **Telerik.Documents.ImageUtils** | This package is required when exporting to `PDF` format a document containing images different than Jpeg and Jpeg2000 or ImageQuality different than High. For more information check the [PdfProcessing`s Cross-Platform Support]({%slug radpdfprocessing-cross-platform%}) article. +| **Telerik.Documents.CMapUtils** | Provides a default implementation for getting the data of a predefined CMap table by a given name. The package is optional and you will need to include a reference to it only if you need to process documents with [CMap tables]({%slug radpdfprocessing-concepts-cmap-tables%}). | +| **Telerik.Documents.Spreadsheet** | The main package for the spreadsheet processing. It is needed for processing XLSX, CSV, TXT documents. | +| **Telerik.Documents.Spreadsheet.FormatProviders.OpenXml** | This package is needed for processing XLSX documents. | +| **Telerik.Documents.Spreadsheet.FormatProviders.Pdf** | This package is needed for exporting to PDF documents. | +| **Telerik.Documents.Spreadsheet.FormatProviders.Xls** | This package is needed for processing XLS documents. | +| **Telerik.Documents.SpreadsheetStreaming** | The main package for generating huge spreadsheet files using minimum resources. | +| **Telerik.Zip** |It is the main package of the [Telerik Zip Library]({%slug radziplibrary-overview%}). | ### Assemblies for .NET Framework -| Assembly Name| Description | +| package Name| Description | |-------|----------------| -| **Telerik.Windows.Documents.Core.dll** | The main assembly from the Telerik document processing libraries. You always need it when you intend to use the library. | -| **Telerik.Windows.Documents.Flow.dll** | Part of the words (text) processing library. It is needed for processing HTML, DOCX, RTF and TXT documents. | -| **Telerik.Windows.Documents.DrawingML.dll** | Part of the words (text) processing library. It is needed for working with shapes inside the documents. | -| **Telerik.Windows.Documents.Flow.FormatProviders.Doc.dll** | Allows importing of DOC and DOT document. | -| **Telerik.Windows.Documents.Flow.FormatProviders.Pdf.dll** | Allows exporting of flow documents (DOCX, DOC, DOT, RTF, and HTML) to PDF. | -| **Telerik.Documents.SpreadsheetStreaming.dll** | The main assembly for generating huge spreadsheet files using minimum resources. | -| **Telerik.Windows.Documents.Spreadsheet.dll** | The main assembly for the spreadsheet processing. It is needed for processing XLSX, CSV, TXT documents. | -| **Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.dll** | This assembly is needed for processing XLSX documents. | -| **Telerik.Windows.Documents.Spreadsheet.FormatProviders.Xls.dll** | This assembly is needed for processing XLS documents. | -| **Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf.dll** | This assembly is needed for processing PDF documents. | -| **Telerik.Windows.Documents.Fixed.dll** | Part of the PDF processing library. It is needed for working with PDF documents. | -| **Telerik.Windows.Documents.Fixed.FormatProviders.Ocr.dll** | This assembly is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. | -| **Telerik.Windows.Documents.Tesseract.Ocr.dll** | This assembly is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. | -| **Telerik.Windows.Documents.CMapUtils.dll** | Provides a default implementation for getting the data of a predefined CMap table by a given name. The assembly is optional and you will need to include a reference to it only if you need to process documents with [CMap tables]({%slug radpdfprocessing-concepts-cmap-tables%}). | -| **Telerik.Windows.Zip.dll** |It is the main assembly of the [Telerik Zip Library]({%slug radziplibrary-overview%}). | -| **Telerik.Windows.Zip.Extensions.dll** | Extends **Telerik.Windows.Zip** assembly with additional helper methods ([Zip Extensions]({%slug radziplibrary-zipextensions%})). | - - ->The libraries support .NET 4.6.2 and later. .NET Standard-compatible binaries are available as well. The assemblies for .NET Standard don't include 'Windows' in their names. +| **Telerik.Windows.Documents.Core** | The main package from the Telerik document processing libraries. You always need it when you intend to use the library. | +| **Telerik.Windows.Documents.Flow** | Part of the words (text) processing library. It is needed for processing HTML, DOCX, RTF and TXT documents. | +| **Telerik.Windows.Documents.DrawingML** | Part of the words (text) processing library. It is needed for working with shapes inside the documents. | +| **Telerik.Windows.Documents.Flow.FormatProviders.Doc** | Allows importing of DOC and DOT document. | +| **Telerik.Windows.Documents.Flow.FormatProviders.Pdf** | Allows exporting of flow documents (DOCX, DOC, DOT, RTF, and HTML) to PDF. | +| **Telerik.Documents.SpreadsheetStreaming** | The main package for generating huge spreadsheet files using minimum resources. | +| **Telerik.Windows.Documents.Spreadsheet** | The main package for the spreadsheet processing. It is needed for processing XLSX, CSV, TXT documents. | +| **Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml** | This package is needed for processing XLSX documents. | +| **Telerik.Windows.Documents.Spreadsheet.FormatProviders.Xls** | This package is needed for processing XLS documents. | +| **Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf** | This package is needed for processing PDF documents. | +| **Telerik.Windows.Documents.Fixed** | Part of the PDF processing library. It is needed for working with PDF documents. | +| **Telerik.Windows.Documents.Fixed.FormatProviders.Ocr** | This package is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. | +| **Telerik.Windows.Documents.Tesseract.Ocr** | This package is needed for the [Optical Character Recognition (OCR)]({%slug radpdfprocessing-formats-and-conversion-ocr-ocrformatprovider%}) functionality. | +| **Telerik.Windows.Documents.CMapUtils** | Provides a default implementation for getting the data of a predefined CMap table by a given name. The package is optional and you will need to include a reference to it only if you need to process documents with [CMap tables]({%slug radpdfprocessing-concepts-cmap-tables%}). | +| **Telerik.Windows.Zip** |It is the main package of the [Telerik Zip Library]({%slug radziplibrary-overview%}). | +| **Telerik.Windows.Zip.Extensions** | Extends **Telerik.Windows.Zip** package with additional helper methods ([Zip Extensions]({%slug radziplibrary-zipextensions%})). | + + +>The libraries support .NET 4.6.2 and later. .NET Standard-compatible packages are available as well. The packages for .NET Standard don't include 'Windows' in their names. ## Getting Started Resources by Library diff --git a/introduction.md b/introduction.md index 81b3a64e..5f413f3c 100644 --- a/introduction.md +++ b/introduction.md @@ -85,9 +85,9 @@ The Telerik Document Processing libraries support the following file formats: ![DPL Ninja](images/dpl-formats.png) -## Available Assemblies +## Required References ->The Telerik Document Processing libraries are available in **.NET Framework**, **{{site.dotnetversions}}** (or newer) for Windows and **.NET Standard** compatible versions. You can download the assemblies of these libraries from the following products: +>The Telerik Document Processing libraries are available in **.NET Framework**, **{{site.dotnetversions}}** (or newer) for Windows and **.NET Standard** compatible versions. You can download the references for these libraries from the following products: > |.NET Framework Products|{{site.dotnetversions}} *for Windows*|.NET Standard| @@ -108,7 +108,7 @@ To start using the libraries right away, see the [First Steps]({%slug getting-st Telerik Document Processing is a commercial library. You are welcome to explore its full functionality and get technical support from the team when you register for a free 30-day trial. To use it commercially, you need to [purchase a license](https://www.telerik.com/purchase.aspx). Feel free to review the Telerik [License Agreement](https://www.telerik.com/purchase/license-agreement/devcraft-complete-dlw-s) to get acquainted with the full terms of use. ->Telerik Document Processing is available as part of **DevCraft**, **UI for ASP.NET Core**, **UI for ASP.NET MVC**, **UI for ASP.NET AJAX**, **UI for Blazor**, **UI for .NET MAUI**, **UI for Xamarin**, **UI for WPF**, **UI for WinForms**, **UI for Silverlight***. The libraries are subject to the license under which you've obtained the assemblies. ( * [Learn about Telerik UI for Silverlight discontinuation, end user options and alternatives.](https://www.telerik.com/products/silverlight/overview.aspx)). +>Telerik Document Processing is available as part of **DevCraft**, **UI for ASP.NET Core**, **UI for ASP.NET MVC**, **UI for ASP.NET AJAX**, **UI for Blazor**, **UI for .NET MAUI**, **UI for Xamarin**, **UI for WPF**, **UI for WinForms**, **UI for Silverlight***. The libraries are subject to the license under which you've obtained the assemblies/NuGet packages. ( * [Learn about Telerik UI for Silverlight discontinuation, end user options and alternatives.](https://www.telerik.com/products/silverlight/overview.aspx)). ## Support Options