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
<a href="/document-processing/faq/how-does-syncfusion-document-processing-manage-fonts">How does Syncfusion Document Processing manage fonts during Office to PDF/Image conversions and PDF processing workflows?</a>
7800
-
</li>
7801
7806
<li>
7802
7807
<a href="/document-processing/faq/how-to-resolve-libskiasharp-not-found-exception-in-net8-and-net9-on-linux">How to resolve LibSkiaSharp not found exception specifically while using SkiaSharp version upto v2.88.8 in .NET 8 and .NET 9 applications hosted on AWS Linux?</a>
Copy file name to clipboardExpand all lines: Document-Processing/Common/Font-Manager/font-manager.md
+52-42Lines changed: 52 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ platform: document-processing
5
5
documentation: UG
6
6
---
7
7
8
-
# How Syncfusion manage fonts in Office-to-PDF/image and PDF processing?
8
+
# Font Manager for Office-to-PDF/Image and PDF Processing
9
9
10
10
## Overview
11
11
@@ -15,45 +15,58 @@ To address this challenge, Syncfusion Document Processing libraries introduce th
15
15
16
16
## Key Features
17
17
18
-
* Shared font caching: Stores fonts in a unified cache to prevent repeated loading across operations.
19
-
* Memory reduction: Eliminates duplicate font objects, reducing memory usage during large-scale or parallel document conversions.
20
-
* Performance optimization: Enables multiple threads to safely reuse the same font instances, improving processing speed.
21
-
* Automatic cleanup: Automatically disposes unused fonts after a configurable delay (FontManager.Delay) to maintain efficiency in long-running applications.
22
-
* Manual cache management: Provides FontManager.ClearCache() to immediately clear all cached fonts when needed (e.g., during server shutdown).
18
+
***Shared font caching:** Stores fonts in a unified cache to prevent repeated loading across operations.
19
+
***Memory reduction:** Eliminates duplicate font objects, reducing memory usage during large-scale or parallel document conversions.
20
+
***Performance optimization:** Enables multiple threads to safely reuse the same font instances, improving processing speed.
21
+
***Automatic cleanup:** Automatically disposes unused fonts after a configurable delay (FontManager.Delay) to maintain efficiency in long-running applications.
22
+
***Manual cache management:** Provides FontManager.ClearCache() to immediately clear all cached fonts when needed (e.g., during server shutdown).
23
23
24
24
## Supported Conversions and Workflows
25
25
26
26
FontManager optimizes memory usage across the following Office to PDF/Image conversions and PDF processing scenarios:
27
27
28
-
### Office Document Conversions
29
-
30
-
**Word Library (DocIO)**
31
-
32
-
* Word to PDF conversion.
33
-
* Word to Image conversion.
34
-
35
-
**Excel Library (XlsIO)**
36
-
37
-
* Excel to PDF conversion.
38
-
* Excel to Image conversion.
39
-
40
-
**PowerPoint Library (Presentation)**
41
-
42
-
* PowerPoint to PDF conversion.
43
-
* PowerPoint to Image conversion.
44
-
45
-
### PDF Processing Workflows
46
-
47
-
**PDF Library Operations**
48
-
49
-
* PDF creation and manipulation
50
-
* PDF merging and splitting
51
-
* PDF form filling and flattening
52
-
* PDF page extraction and insertion
53
-
* Adding text, images, and annotations to PDF
54
-
* PDF redaction and security
55
-
* PDF/A conformance
56
-
* OCR text extraction
28
+
<table>
29
+
<tr>
30
+
<th>Category</th>
31
+
<th>Details</th>
32
+
</tr>
33
+
<tr>
34
+
<td><b>Office Document Conversions</b></td>
35
+
<td>
36
+
<b>Word Library (DocIO)</b>
37
+
<ul>
38
+
<li>Word to PDF conversion.</li>
39
+
<li>Word to Image conversion.</li>
40
+
</ul>
41
+
<b>Excel Library (XlsIO)</b>
42
+
<ul>
43
+
<li>Excel to PDF conversion.</li>
44
+
<li>Excel to Image conversion.</li>
45
+
</ul>
46
+
<b>PowerPoint Library (Presentation)</b>
47
+
<ul>
48
+
<li>PowerPoint to PDF conversion.</li>
49
+
<li>PowerPoint to Image conversion.</li>
50
+
</ul>
51
+
</td>
52
+
</tr>
53
+
<tr>
54
+
<td><b>PDF Processing Workflows</b></td>
55
+
<td>
56
+
<b>PDF Library Operations</b>
57
+
<ul>
58
+
<li>PDF creation and manipulation</li>
59
+
<li>PDF merging and splitting</li>
60
+
<li>PDF form filling and flattening</li>
61
+
<li>PDF page extraction and insertion</li>
62
+
<li>Adding text, images, and annotations to PDF</li>
63
+
<li>PDF redaction and security</li>
64
+
<li>PDF/A conformance</li>
65
+
<li>OCR text extraction</li>
66
+
</ul>
67
+
</td>
68
+
</tr>
69
+
</table>
57
70
58
71
N> FontManager automatically manages fonts across all these conversion types, whether you're processing a single document or handling thousands of concurrent conversions in a multi-threaded environment.
59
72
@@ -66,7 +79,7 @@ The `FontManager.Delay` property defines the duration (in milliseconds) after wh
66
79
67
80
N> This configuration is optional. By default, unused fonts are automatically cleaned up 30 seconds after their references are released. To customize the delay, set this property at the application startup (e.g., in `Startup.cs` or `Program.cs`).
68
81
69
-
### Example: Basic Configuration
82
+
The following example demonstrates how to configure `FontManager.Delay` to automatically release cached fonts after the specified delay during document conversions.
70
83
71
84
{% tabs %}
72
85
{% highlight C# %}
@@ -79,9 +92,7 @@ FontManager.Delay = 50000;
79
92
{% endhighlight %}
80
93
{% endtabs %}
81
94
82
-
### Example: ASP.NET Core Application
83
-
84
-
The following example demonstrates how to configure `FontManager.Delay` in an ASP.NET Core application to ensure cached fonts are automatically released after the specified delay during document conversions.
95
+
The following example demonstrates how to configure `FontManager.Delay` in an **ASP.NET Core application** to ensure cached fonts are automatically released after the specified delay during document conversions.
85
96
86
97
{% tabs %}
87
98
@@ -118,7 +129,7 @@ The `FontManager.ClearCache()` method immediately clears all font caches managed
118
129
* Before maintenance operations.
119
130
* When immediate memory reclamation is required.
120
131
121
-
### Example: Basic Usage
132
+
The following example demonstrates how to immediately clear all cached fonts using `FontManager.ClearCache()`.
122
133
123
134
{% tabs %}
124
135
{% highlight C# %}
@@ -131,7 +142,7 @@ FontManager.ClearCache();
131
142
{% endhighlight %}
132
143
{% endtabs %}
133
144
134
-
### Example: ASP.NET Core Application Shutdown
145
+
The following example demonstrates how to configure `FontManager.ClearCache()` in an **ASP.NET Core application** to clear cached fonts during application shutdown.
135
146
136
147
{% tabs %}
137
148
{% highlight C# %}
@@ -145,7 +156,6 @@ var lifetime = app.Services.GetRequiredService<IHostApplicationLifetime>();
145
156
// Register a callback to clear font cache during application shutdown
Copy file name to clipboardExpand all lines: Document-Processing/Word/Conversions/Word-To-Image/NET/Unsupported-elements-word-to-image.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ Linked text boxes are not supported.
110
110
Ink elements
111
111
</td>
112
112
<td>
113
-
Supported only in DOCX format document to image.
113
+
Supported only in DOCX format document to image. Additional behavior explained {{ '[here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/unsupported-elements-word-to-pdf#ink)' | markdownify }}.
Copy file name to clipboardExpand all lines: Document-Processing/Word/Conversions/Word-To-PDF/NET/Unsupported-elements-word-to-pdf.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ Linked text boxes are not supported.
129
129
Ink elements
130
130
</td>
131
131
<td>
132
-
Supported only in DOCX format document to PDF.
132
+
Supported only in DOCX format document to PDF. Additional behavior explained {{ '[here](https://help.syncfusion.com/document-processing/word/conversions/word-to-pdf/net/unsupported-elements-word-to-pdf#ink)' | markdownify }}.
133
133
</td>
134
134
</tr>
135
135
</table>
@@ -245,6 +245,12 @@ SmartArt typically contains graphic properties, including bounds information for
245
245
246
246
Creating, editing, or cloning Drawing Canvas elements programmatically is not supported. These elements are not included in Find and Replace functionality or document comparison. Additionally, when opening Word 2003 or 2007 DOCX documents, the Drawing Canvas is treated as a group shape.
247
247
248
+
### Ink
249
+
250
+
During Word-to-PDF and Word-to-Image conversions, Syncfusion Word Library uses fallback images embedded in the document to preserve the Ink visual appearance. However, when Ink is created or modified using the Syncfusion Word Library, some Ink effects cannot be rendered accurately due to rendering engine limitations. Although the Ink stroke geometry is preserved, visual brush effects are lost.
251
+
252
+
**To resolve this**, save the created or modified document using DocIO first in DOCX format. Then, open the saved document in Microsoft Word and save it again. Finally, convert it to PDF or Image using DocIO. This process regenerates the required Ink fallback images, ensuring accurate visual output.
253
+
248
254
## Show Warning for Unsupported Elements
249
255
250
256
When converting a Word document to a PDF, the presence of unsupported elements in the input Word document can lead to preservation issues in the converted PDF. The .NET Word library (DocIO) contains [Warning](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocToPDFConverter.DocToPDFConverterSettings.html#Syncfusion_DocToPDFConverter_DocToPDFConverterSettings_Warning) API, which helps to detect and handle these unsupported elements during the conversion process. This API holds the information of unsupported elements once found in the input Word document.
0 commit comments