You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libraries/radpdfprocessing/concepts/cmaps.md
+1-7Lines changed: 1 addition & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,13 +24,7 @@ The **Telerik[.Windows].Documents.CMapUtils.dll** assembly provides a default im
24
24
>To use this functionality, you must add a reference to the **Telerik[.Windows].Documents.CMapUtils.dll**.
25
25
26
26
#### [C#] Example 1: Register default CMapsProvider
27
-
{{region radpdfprocessing-concepts-cmap_0}}
28
-
// For .NET Framework
29
-
Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.PredefinedCMapsProvider = new Telerik.Windows.Documents.CMapUtils.PredefinedCMapsProvider();
30
-
31
-
// For .NET Standard
32
-
Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.PredefinedCMapsProvider = new Telerik.Documents.CMapUtils.PredefinedCMapsProvider();
33
-
{{endregion}}
27
+
<snippetid='pdf-cmaps'/>
34
28
35
29
After registering the **PredefinedCMapsProvider** class, you will be able to import any document containing a predefined CMap table.
The gradient created in __Example 2__ is shown in __Figure 1__.
86
+
The gradient created in __Example 2__ is shown in __Figure 1__.
113
87
114
-
#### Figure 1: LinearGradient
115
-

88
+
#### Figure 1: LinearGradient
89
+
90
+

116
91
117
92
*__RadialGradient__: Defines a blend between two circles, optionally extended beyond the boundary circles by continuing the boundary colors. The __RadialGradient__ class exposes the following properties:
118
93
@@ -124,16 +99,7 @@ The __Gradient__ class is inherited by the following classes:
>tip Each registered font can be obtained from the font repository as __FontBase__ object and applied to a __[TextFragment]({%slug radpdfprocessing-model-textfragment%})__ through its __Font__ property.
141
118
142
-
{{region cs-radpdfprocessing-concepts-fonts_3}}
143
-
144
-
FontBase courier = FontsRepository.Courier;
145
-
TextFragment textFragment = new TextFragment();
146
-
textFragment.Font = courier;
147
-
148
-
{{endregion}}
119
+
<snippetid='pdf-text-fragment-font'/>
149
120
150
121
__Example 2__ shows how to create a font using the FontsRepository.
151
122
152
-
153
123
#### __[C#] Example 2: Create FontBase__
154
124
155
-
{{region cs-radpdfprocessing-concepts-fonts_4}}
156
-
FontBase font;
157
-
bool success = FontsRepository.TryCreateFont(fontFamily, fontStyle, fontWeight, out font);
158
-
{{endregion}}
125
+
<snippetid='pdf-bool-font-creation'/>
159
126
160
127
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.
PdfExportSettings settings = new PdfExportSettings();
38
-
settings.ImageQuality = ImageQuality.Medium;
39
-
{{endregion}}
36
+
<snippetid='pdf-image-quality'/>
40
37
41
38
> `PdfExportSettings.ImageQuality` property doesn't affect the quality of the 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`.
42
39
@@ -46,9 +43,7 @@ If you need some particular image to be exported with a different **ImageQuality
46
43
47
44
#### __[C#] Example 2: Set the image quality of an image__
>note A complete SDK example of a custom implementation JpegImageConverterBase is available on our [GitHub repository](https://github.com/telerik/document-processing-sdk/tree/master/PdfProcessing/CustomJpegImageConverter).
0 commit comments