Skip to content

Commit 605c145

Browse files
committed
polished KB
1 parent c91b3d4 commit 605c145

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

knowledge-base/fixing-double-bold-text-issue-in-pdf-document.md

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: Resolving Double-Bold Appearance in PDF Export Using Telerik WordsProcessing
3-
description: Learn how to resolve the double-bold appearance issue in PDFs generated by Telerik WordsProcessing using font registration and style configuration.
2+
title: Resolving Double-Bold Text Appearance in PDF Export Using Telerik Document Processing
3+
description: Learn how to resolve the double-bold text appearance issue in PDFs generated by Telerik WordsProcessing using font registration and style configuration.
44
type: how-to
55
page_title: Fixing Double-Bold Text Issue in PDFs Exported from Telerik WordsProcessing
66
meta_title: Fixing Double-Bold Text Issue in PDFs Exported from Telerik WordsProcessing
77
slug: fixing-double-bold-text-issue-in-pdf-document
8-
tags: words,processing, pdf, pdfformatprovider, font,embed, arial-narrow, register
8+
tags: word,processing, pdf, provider, font,embed, arial, narrow, register, bold
99
res_type: kb
1010
ticketid: 1698628
1111
---
@@ -18,18 +18,16 @@ ticketid: 1698628
1818

1919
## Description
2020

21-
When exporting documents to PDF using Telerik WordsProcessing, the bold text may appear "double-bold" in PDF viewers like Edge or Chrome. This issue arises due to font embedding settings or inaccuracies in font file access, specifically with condensed fonts like Arial Narrow Bold.
22-
23-
This knowledge base article also answers the following questions:
24-
- How to fix bold text rendering issues in PDFs generated by Telerik WordsProcessing?
25-
- Why does the bold text in PDFs look thicker than expected?
26-
- How to correctly embed Arial Narrow Bold in Telerik WordsProcessing?
21+
When exporting documents to PDF using Telerik WordsProcessing, the bold text may appear "double-bold" in browsers like Edge or Chrome. This issue arises due to font embedding settings or inaccuracies in font file access, specifically with condensed fonts like Arial Narrow Bold.
22+
This knowledge base article gives some tips how to fix double-bold text rendering issues in PDFs generated by Telerik WordsProcessing.
2723

2824
## Solution
2925

26+
The "double bold" text appearance in PDF viewers like Edge or Chrome is typically caused by font embedding. Using [FontEmbeddingType.Full]({%slug radpdfprocessing-formats-and-conversion-pdf-settings%}) can sometimes cause duplication if both, regular and bold, font variants are embedded and the viewer applies bold rendering on top. If your style already sets bold, avoid setting the Run.FontWeight property to FontWeights.Bold again. Double-assigning bold can lead to rendering issues.
27+
3028
To resolve the double-bold appearance issue, manually register the correct font files for Arial Narrow Bold and configure the style settings properly. Follow these steps:
3129

32-
1. Register the correct font files at the start of your application using `FontsRepository.RegisterFont`. This ensures that the library uses the appropriate font variations for bold and italic.
30+
1. Register the correct font files at the start of your application using FontsRepository.[RegisterFont]({%slug radpdfprocessing-concepts-fonts%}#registering-a-font). This ensures that the library uses the appropriate font variations for bold and italic.
3331

3432
```csharp
3533
FontsRepository.RegisterFont(new System.Windows.Media.FontFamily("Arial Narrow"), FontStyles.Normal, FontWeights.Bold,
@@ -40,7 +38,7 @@ To resolve the double-bold appearance issue, manually register the correct font
4038
File.ReadAllBytes(@"C:\WINDOWS\FONTS\ARIALNBI.TTF"));
4139
```
4240

43-
2. Define a style for the references section to apply the correct font family and weight settings.
41+
2. Define a [style]({%slug radwordsprocessing-concepts-styles%}) for the desired section to apply the correct font family and weight settings.
4442

4543
```csharp
4644
Telerik.Windows.Documents.Flow.Model.Styles.Style referenceStyleChar = new Telerik.Windows.Documents.Flow.Model.Styles.Style("ReferenceStyleChar", StyleType.Character);
@@ -51,7 +49,7 @@ To resolve the double-bold appearance issue, manually register the correct font
5149
document.StyleRepository.Add(referenceStyleChar);
5250
```
5351

54-
3. Apply the style to the desired text or runs in your document.
52+
3. Apply the style to the desired text or [Runs]({%slug radwordsprocessing-model-run%}) in your document.
5553

5654
```csharp
5755
foreach (var referenceParagraph in referenceParagraphs)
@@ -67,7 +65,7 @@ To resolve the double-bold appearance issue, manually register the correct font
6765
}
6866
```
6967

70-
4. Use the `FontEmbeddingType.Subset` setting when exporting to PDF to avoid redundant font embedding.
68+
4. Use the `FontEmbeddingType.Subset` setting when [exporting to PDF]({%slug radwordsprocessing-formats-and-conversion-pdf-settings%}) to avoid redundant font embedding.
7169

7270
```csharp
7371
PdfFormatProvider PDFprovider = new PdfFormatProvider();
@@ -86,10 +84,6 @@ To resolve the double-bold appearance issue, manually register the correct font
8684

8785
## See Also
8886

89-
- [WordsProcessing Overview](https://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/overview)
90-
- [PdfFormatProvider](https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/pdfformatprovider/overview)
91-
- [FontEmbeddingType Enum](https://docs.telerik.com/devtools/document-processing/api/telerik.windows.documents.flow.formatproviders.pdf.export.fontembeddingtype)
92-
- [RegisterFont Method](https://docs.telerik.com/devtools/document-processing/api/telerik.windows.documents.flow.model.fonts.fontrepository#registerfont)
93-
- [System.Windows.Media.Typeface.TryGetGlyphTypeface Issue](https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.typeface.trygetglyphtypeface?redirectedfrom=MSDN)
87+
- [Fonts in PdfProcessing]({%slug radpdfprocessing-concepts-fonts%})
9488

9589

libraries/radpdfprocessing/concepts/fonts.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,4 @@ You can create fonts that are not explicitly registered. Creating a font that is
169169
* [How to Prevent Text with Special Characters from Being Cut Off when converting HTML to PDF using RadWordsProcessing]({%slug prevent-text-cut-off-pdf-conversion-radwordsprocessing%})
170170
* [Validating Fonts when Using Telerik Document Processing]({%slug validating-fonts-pdf-document-processing%})
171171
* [Resolving Apostrophe Character Being Replaced with Copyright Symbol in Filled PDF AcroForm]({%slug apostrophe-character-replaced-copyright-symbol-acroform%})
172+
* [Resolving Double-Bold Text Appearance in PDF Export Using Telerik Document Processing]({%slug fixing-double-bold-text-issue-in-pdf-document%})

0 commit comments

Comments
 (0)