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: Document-Processing/Common/font-manager.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ documentation: UG
11
11
12
12
Font creation is a primary cause of excessive memory consumption and performance degradation during Office to PDF/Image conversions and PDF processing workflows. This problem is particularly pronounced in multi-threaded web applications where multiple users perform concurrent operations across different threads or browser tabs.
13
13
14
-
To address this challenge, Syncfusion Document Processing libraries introduce the **FontManager** class, which provides centralized font management shared across all threads and conversion libraries. This approach eliminates duplicate font objects and significantly reduces memory overhead.
14
+
To address this challenge, Syncfusion Document Processing libraries introduce the [FontManager](https://help.syncfusion.com/cr/document-processing/Syncfusion.Drawing.Fonts.FontManager.html) class, which provides centralized font management shared across all threads and conversion libraries. This approach eliminates duplicate font objects and significantly reduces memory overhead.
15
15
16
16
## Key Features
17
17
@@ -55,14 +55,12 @@ FontManager optimizes memory usage across the following Office to PDF/Image conv
55
55
<td>
56
56
<b>PDF Library Operations</b>
57
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>
58
+
<li>PDF/A Creation and Conversion</li>
59
+
<li>Annotations and Forms: Fill and Flatten</li>
60
+
<li>XPS to PDF Conversion</li>
61
+
<li>EMF to PDF Conversion</li>
62
+
<li>Insert Text in PDF</li>
63
+
<li>Tables and Light Tables (Data Grids in PDF)</li>
66
64
</ul>
67
65
</td>
68
66
</tr>
@@ -72,7 +70,7 @@ N> FontManager automatically manages fonts across all these conversion types, wh
72
70
73
71
## Configuring Automatic Font Cleanup
74
72
75
-
The `FontManager.Delay` property defines the duration (in milliseconds) after which unused font objects are automatically disposed and removed from the cache. When fonts are no longer referenced, an internal `System.Timers.Timer` triggers disposal based on this value.
73
+
The [FontManager.Delay](https://help.syncfusion.com/cr/document-processing/Syncfusion.Drawing.Fonts.FontManager.html#Syncfusion_Drawing_Fonts_FontManager_Delay) property defines the duration (in milliseconds) after which unused font objects are automatically disposed and removed from the cache. When fonts are no longer referenced, an internal `System.Timers.Timer` triggers disposal based on this value.
The `FontManager.ClearCache()` method immediately clears all font caches managed by the FontManager. This method forcefully removes and disposes all font instances maintained in shared caches, allowing you to reclaim memory deterministically without waiting for the automatic cleanup delay.
121
+
The [FontManager.ClearCache()](https://help.syncfusion.com/cr/document-processing/Syncfusion.Drawing.Fonts.FontManager.html#Syncfusion_Drawing_Fonts_FontManager_ClearCache) method immediately clears all font caches managed by the FontManager. This method forcefully removes and disposes all font instances maintained in shared caches, allowing you to reclaim memory deterministically without waiting for the automatic cleanup delay.
124
122
125
123
**Use cases:**
126
124
@@ -165,6 +163,8 @@ app.Run();
165
163
{% endhighlight %}
166
164
{% endtabs %}
167
165
166
+
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Unified-font-manager/.NET/).
167
+
168
168
## Best Practices
169
169
170
170
1. Set FontManager.Delay early: Configure the delay property in your application's startup code before any document processing begins (Optional).
By running the above code, you will generate an **Ink with multiple trace points** as shown below.
251
250

252
251
252
+
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Ink/Create-ink-with-multipletraces/.NET/).
253
+
253
254
The following code example shows GetPoints method which is used to get trace points.
254
255
255
256
{% tabs %}
@@ -377,7 +378,7 @@ The following code example demonstrates how to customize the Ink Effect.
FileStream fileStreamPath = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
@@ -579,13 +584,15 @@ document.Close()
579
584
By running the above code, you will generate a **Modified ink thickness** as shown below.
580
585

581
586
587
+
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Ink/Modify-ink-thickness/.NET/).
588
+
582
589
### Modify Ink Points
583
590
584
591
The following code example demonstrates how to customize the Ink Points.
FileStream fileStreamPath = new FileStream("Template.docx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
@@ -730,6 +739,8 @@ document.Close()
730
739
731
740
By running the above code, you will generate a **Remove Ink** as shown below.
732
741

742
+
743
+
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Ink/Remove-ink/.NET/).
733
744
734
745
## Limitations
735
746
@@ -758,3 +769,8 @@ During Word-to-PDF and Word-to-Image conversions, Syncfusion Word Library uses f
758
769
*[How Trace Points Are Calculated?](https://help.syncfusion.com/document-processing/word/word-library/net/faqs/paragraph-and-paragraph-items-faqs#how-trace-points-are-calculated)
*[How to Set Stroke Thickness?](https://help.syncfusion.com/document-processing/word/word-library/net/faqs/paragraph-and-paragraph-items-faqs#how-to-set-stroke-thickness)
772
+
773
+
## Online Demo
774
+
775
+
* Explore how to create a Word document with Ink using the .NET Word Library (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/createink#/tailwind).
776
+
* Explore how to edit a Word document with Ink using the .NET Word Library (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/editink#/tailwind).
0 commit comments