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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ai-tools/agent-tools/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Below is a comprehensive example demonstrating the entire workflow from setup to

>warning If you are building a multi-user application, see the [Multi-User AI Agent Sessions]({%slug agent-tools-multi-user-scenario%}) article for patterns on isolating document repositories per user and managing concurrent sessions safely.

<snippet id='ai-tools-agent-tools-getting-started-complete-example'/>
<snippet id='ai-tools-agent-tools-getting-started'/>

## Security Considerations

Expand Down
4 changes: 2 additions & 2 deletions common-information/clear-output-stream-on-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ No code changes are required on the consumer side. The clearing happens automati

**Example 1: Reusing a MemoryStream for Multiple Exports**

<snippet id='reuse-stream-for-multiple-exports'/>
<snippet id='common-information-clear-output-stream-on-export-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'/>
<snippet id='common-information-clear-output-stream-on-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.

Expand Down
2 changes: 1 addition & 1 deletion common-information/fileformatdetector.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Represents the result of a file format detection operation.

The following example demonstrates how to detect the format of a document from a file stream:

<snippet id='libraries-common-fileformatdetector-detect-format'/>
<snippet id='common-information-fileformatdetector'/>

## See Also

Expand Down
8 changes: 4 additions & 4 deletions getting-started/first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ Use the following snippet to create the `RadFlowDocument` instance that the samp

#### **Example 1: Create a RadFlowDocument**

<snippet id='first-steps-create-document'/>
<snippet id='getting-started-first-steps-create-document'/>

## Step 5: Import an Existing DOCX File

Use this optional step if you want to start from an existing DOCX file instead of building the document content entirely in code.

### Example 2: Import a DOCX File

<snippet id='first-steps-import-docx'/>
<snippet id='getting-started-first-steps-import-docx'/>

## Step 6: Export the Generated Document

Expand All @@ -96,15 +96,15 @@ Use [DocxFormatProvider]({%slug radwordsprocessing-formats-and-conversion-docx-d

### Example 3: Export a RadFlowDocument to DOCX

<snippet id='first-steps-export-docx'/>
<snippet id='getting-started-first-steps-export-docx'/>

### Export the RadFlowDocument to PDF

Use [PdfFormatProvider]({%slug radpdfprocessing-formats-and-conversion-pdf-pdfformatprovider%}) to export the same `RadFlowDocument` to a PDF file.

### Example 4: Export a RadFlowDocument to PDF

<snippet id='first-steps-export-pdf'/>
<snippet id='getting-started-first-steps-export-pdf'/>

## Step 7: Run the Project and Verify the Output

Expand Down
4 changes: 2 additions & 2 deletions libraries/radpdfprocessing/concepts/clipping.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The `Clipping` element exposes a single property:

#### __Example 1: Create Clipping__

<snippet id='pdf-clipping-geometry'/>
<snippet id='libraries-pdf-concepts-clipping-geometry'/>

## Using Clipping

Expand All @@ -32,7 +32,7 @@ All inheritors of the `ContentElementBase` class expose a `Clipping` property. S

#### __Example 2: Use Clipping__

<snippet id='pdf-image-clipping'/>
<snippet id='libraries-pdf-concepts-clipping-image-clipping'/>



Expand Down
2 changes: 1 addition & 1 deletion libraries/radpdfprocessing/concepts/cmaps.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The **Telerik[.Windows].Documents.CMapUtils** package provides a default impleme
>To use this feature, you must add a reference to the **Telerik[.Windows].Documents.CMapUtils package**.

#### Example 1: Register Default CMapsProvider
<snippet id='pdf-cmaps'/>
<snippet id='libraries-pdf-concepts-cmaps'/>

After you register the `PredefinedCMapsProvider` class, you can import any document containing a predefined CMap table.

Expand Down
14 changes: 7 additions & 7 deletions libraries/radpdfprocessing/concepts/colors-and-color-spaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The following example shows how to create an `RgbColor` and assign it as Fill of

#### **Create RgbColor**

<snippet id='pdf-create-rgb-color'/>
<snippet id='libraries-pdf-concepts-colors-and-color-spaces-create-rgb-color'/>

### GrayColor

Expand All @@ -48,7 +48,7 @@ The following example covers the most common `GrayColor` scenarios: default and

#### Create GrayColor

<snippet id='pdf-create-gray-color'/>
<snippet id='libraries-pdf-concepts-colors-and-color-spaces-create-gray-color'/>

### CmykColor

Expand All @@ -63,7 +63,7 @@ Represents a CMYK (cyan, magenta, yellow, key) color. The `CmykColor` class was

#### Create CmykColor

<snippet id='pdf-create-cmyk-color'/>
<snippet id='libraries-pdf-concepts-colors-and-color-spaces-create-cmyk-color'/>

![CMYK Color](images/cmyk-color.png)

Expand Down Expand Up @@ -94,7 +94,7 @@ The `Gradient` class is inherited by the following classes:

#### **Example 2: Create LinearGradient**

<snippet id='pdf-create-linear-gradient'/>
<snippet id='libraries-pdf-concepts-colors-and-color-spaces-create-linear-gradient'/>

The gradient created in **Example 2** is shown in **Figure 1**.

Expand All @@ -113,7 +113,7 @@ The gradient created in **Example 2** is shown in **Figure 1**.

#### **Example 3: Create RadialGradient**

<snippet id='pdf-create-linear-gradient'/>
<snippet id='libraries-pdf-concepts-colors-and-color-spaces-create-linear-gradient'/>

The result from **Example 3** is shown in **Figure 2**.

Expand Down Expand Up @@ -146,7 +146,7 @@ Because the `TilingBase` class implements the `IContentRootElement` interface li

#### __Example 4: Create Tiling__

<snippet id='pdf-create-tiling'/>
<snippet id='libraries-pdf-concepts-colors-and-color-spaces-create-tiling'/>

The tiling created in **Example 4** is shown in **Figure 3**.

Expand All @@ -159,7 +159,7 @@ The **LAB** color space is device-independent. **L** represents lightness or bri

#### **Create LabColor**

<snippet id='pdf-create-lab-color'/>
<snippet id='libraries-pdf-concepts-colors-and-color-spaces-create-lab-color'/>

## See Also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ The `PdfFormatProvider` class exports a `RadFixedDocument` to PDF and allows you

To comply with any of the standards, set the `ComplianceLevel` property to a value different than `None`:

<snippet id='libraries-pdf-concepts-compliance-ensure-compliance'/>
<snippet id='libraries-pdf-concepts-comply-with-pdfa-standard-compliance-ensure-compliance'/>

### Accessibility Compliance

To comply with the [accessibility]({%slug create-accessible-pdf-documents%}) requirements of the PDF/A-1a, PDF/A-2a, PDF/A-3a, or PDF/UA-1 standards, you must also set the [TaggingStrategy]({%slug radpdfprocessing-model-tagged-pdf%}) property of the `PdfFormatProvider` `PdfExportSettings`.

<snippet id='libraries-pdf-concepts-compliance-ensure-accessability-compliance'/>
<snippet id='libraries-pdf-concepts-comply-with-pdfa-standard-compliance-ensure-accessability-compliance'/>

This ensures that the exported PDF document is properly tagged, which is essential for meeting these standards' requirements.

Expand All @@ -72,11 +72,11 @@ This ensures that the exported PDF document is properly tagged, which is essenti

When you work with PDF/A-compliant documents, you can specify fallback fonts for the standard fonts to ensure proper rendering when the standard font is unavailable or needs to be replaced:

<snippet id='libraries-pdf-concepts-comply-with-pdfa-set-standard-font-fallback'/>
<snippet id='libraries-pdf-concepts-comply-with-pdfa-standard-comply-with-pdfa-set-standard-font-fallback'/>

If you need to remove all configured fallback fonts, use the `ClearStandardFontFallbacks()` method:

<snippet id='libraries-pdf-concepts-comply-with-pdfa-clear-fallback-fonts'/>
<snippet id='libraries-pdf-concepts-comply-with-pdfa-standard-comply-with-pdfa-clear-fallback-fonts'/>

## See Also

Expand Down
16 changes: 8 additions & 8 deletions libraries/radpdfprocessing/concepts/fonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,27 @@ There are 14 *Type 1* fonts, known as the standard 14 fonts, that are not embedd
| Symbol|
| ZapfDingbats|

<snippet id='pdf-standard-font'/>
<snippet id='libraries-pdf-concepts-fonts-standard-font'/>

>tip These fonts, or their font metrics and suitable substitution fonts, must be available to the consumer application.

RadPdfProcessing introduced a suitable API for replacing the predefined Standard Fonts in **R2 2023**. The public static method `ReplaceStandardFont(StandardFontNames name, byte[] data)` offered by `FontsRepository` replaces the provided standard font with the passed font data:

#### Replace a Standard Font

<snippet id='pdf-replace-standard-font'/>
<snippet id='libraries-pdf-concepts-fonts-replace-standard-font'/>

#### Set a Fallback Font

You can configure fallback fonts for the standard fonts to ensure proper rendering when a standard font needs to be substituted with another font.

The following example demonstrates how to set a fallback font for a specific standard font:

<snippet id='libraries-pdf-concepts-comply-with-pdfa-set-standard-font-fallback'/>
<snippet id='libraries-pdf-concepts-fonts-comply-with-pdfa-set-standard-font-fallback'/>

To remove all configured fallback fonts, use the `ClearStandardFontFallbacks()` method:

<snippet id='libraries-pdf-concepts-comply-with-pdfa-clear-fallback-fonts'/>
<snippet id='libraries-pdf-concepts-fonts-comply-with-pdfa-clear-fallback-fonts'/>

## Embedded Fonts

Expand All @@ -115,23 +115,23 @@ If you want to use a font that is not part of the standard ones, register it usi

#### __Example 1: Register font in .NET Framework application__

<snippet id='pdf-register-font-net-framework'/>
<snippet id='libraries-pdf-concepts-fonts-register-font-net-framework'/>

#### __Example 1: Register font in .NET Standard application__

<snippet id='pdf-register-font-net-standard'/>
<snippet id='libraries-pdf-concepts-fonts-register-font-net-standard'/>

### Creating a Font

>tip Each registered font can be obtained from the font repository as a `FontBase` object and applied to a [TextFragment]({%slug radpdfprocessing-model-textfragment%}) through its `Font` property.

<snippet id='pdf-text-fragment-font'/>
<snippet id='libraries-pdf-concepts-fonts-text-fragment-font'/>

**Example 2** shows how to create a font using `FontsRepository`.

#### __Example 2: Create FontBase__

<snippet id='pdf-bool-font-creation'/>
<snippet id='libraries-pdf-concepts-fonts-bool-font-creation'/>

You can create fonts that are not explicitly registered. Creating a font that is not registered in the repository with the code from **Example 2** tries to find the font from the ones installed on the machine.

Expand Down
4 changes: 2 additions & 2 deletions libraries/radpdfprocessing/concepts/geometry.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This article covers the supported geometry types:

#### __Example 1: Create RectangleGeometry__

<snippet id='pdf-create-rectangle-geometry'/>
<snippet id='libraries-pdf-concepts-geometry-create-rectangle-geometry'/>



Expand All @@ -60,7 +60,7 @@ This article covers the supported geometry types:

#### __Example 2: Create PathGeometry__

<snippet id='pdf-create-path-geometry'/>
<snippet id='libraries-pdf-concepts-geometry-create-path-geometry'/>



Expand Down
4 changes: 2 additions & 2 deletions libraries/radpdfprocessing/concepts/imagequality.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To specify the default `ImageQuality` value when exporting to PDF, use the [PdfE

#### __Example 1: Set a default value for all images in a document__

<snippet id='pdf-image-quality'/>
<snippet id='libraries-pdf-concepts-imagequality-image-quality'/>

> The `PdfExportSettings.ImageQuality` property does not affect the quality of images imported from a PDF document. Such images are preserved using `EncodedImageData` (see [ImageQuality and EncodedImageData Class](#imagequality-and-encodedimagedata-class)). `PdfExportSettings.ImageQuality` only affects the export quality of images created using an image stream or a `BitmapSource`.

Expand All @@ -44,7 +44,7 @@ If you need a particular image to be exported with a different `ImageQuality` va

#### __Example 2: Set the image quality of an image__

<snippet id='pdf-image-source-quality'/>
<snippet id='libraries-pdf-concepts-imagequality-image-source-quality'/>


### ImageQuality and EncodedImageData Class
Expand Down
4 changes: 2 additions & 2 deletions libraries/radpdfprocessing/concepts/position.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The `MatrixPosition` class exposes a static `Default` property, which represents

#### __Example 1: Transform MatrixPosition__

<snippet id='pdf-matrix-position'/>
<snippet id='libraries-pdf-concepts-position-matrix-position'/>

The resulting matrix position is translated both horizontally and vertically by 50.

Expand All @@ -68,7 +68,7 @@ The `SimplePosition` class exposes a static `Default` property which represents

#### __Example 2: Transform SimplePosition__

<snippet id='pdf-simple-position'/>
<snippet id='libraries-pdf-concepts-position-simple-position'/>

The resulting simple position is translated both horizontally and vertically by 30, because of the transformation overwriting.

Expand Down
8 changes: 4 additions & 4 deletions libraries/radpdfprocessing/cross-platform/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ PdfProcessing provides a default implementation called `ImagePropertiesResolver`

#### **Example 1: Set the default implementation of the ImagePropertiesResolver class**

<snippet id='pdf-image-property-resolver'/>
<snippet id='libraries-pdf-cross-platform-images-image-property-resolver'/>

### Custom Implementation for ImagePropertiesResolver

Expand All @@ -67,7 +67,7 @@ The **Telerik.Documents.ImageUtils** package provides a default implementation o

#### **Example 2: Set the default implementation of the JpegImageConverter class**

<snippet id='pdf-jpeg-image-converter'/>
<snippet id='libraries-pdf-cross-platform-images-jpeg-image-converter'/>

### Custom Implementation for JpegImageConverter

Expand All @@ -88,11 +88,11 @@ The following `using`/`imports` statements are required in the project:

#### **Example 3: Create a custom implementation inheriting the JpegImageConverterBase abstract class**

<snippet id='pdf-custom-sixlabors-imagesharp-converter'/>
<snippet id='libraries-pdf-cross-platform-images-custom-sixlabors-imagesharp-converter'/>

#### **Example 4: Set the custom implementation to the JpegImageConverter property of the FixedExtensibilityManager**

<snippet id='pdf-set-custom-image-converter'/>
<snippet id='libraries-pdf-cross-platform-images-set-custom-image-converter'/>

>note A complete SDK example of a custom `JpegImageConverterBase` implementation is available on the [GitHub repository](https://github.com/telerik/document-processing-sdk/tree/master/PdfProcessing/CustomJpegImageConverter).

Expand Down
Loading