Skip to content

Commit 464dbcf

Browse files
Merge branch 'development' into BLAZ-897019-FigmaUG
2 parents c2b5e5f + b492b89 commit 464dbcf

15 files changed

+135
-7
lines changed

blazor-toc.html

Lines changed: 3 additions & 1 deletion
Large diffs are not rendered by default.

blazor/Release-Notes/26.2.4.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Essential Studio for Blazor 2024 Volume 2 SP Release Release Notes
3+
description: Essential Studio for Blazor 2024 Volume 2 SP Release Release Notes
4+
platform: Blazor
5+
documentation: ug
6+
---
7+
8+
# Essential Studio for Blazor Release Notes
9+
10+
{% include release-info.html date="July 24, 2024" version="v26.2.4" %}
11+
12+
{% directory path: _includes/release-notes/v26.2.4 %}
13+
14+
{% include {{file.url}} %}
15+
16+
{% enddirectory %}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
layout: post
3+
title: Load Custom Fonts in a PDF Viewer | Syncfusion
4+
description: Learn here all about Custom Fonts in Blazor application in Syncfusion Blazor SfPdfViewer component and more.
5+
platform: Blazor
6+
control: SfPdfViewer
7+
documentation: ug
8+
---
9+
10+
# Load Custom Fonts in a PDF Viewer
11+
12+
Syncfusion Blazor PDF Viewer utilizes Pdfium to extract the text and convert the PDF document as images. Pdfium supports a limited set of fonts by default. To expand this capability, [CustomFonts](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_CustomFonts) can be used to load additional fonts that are not embedded within Pdfium.
13+
14+
To implement CustomFonts, follow these steps:
15+
16+
1. Upload the font files you want to use into the `wwwroot` folder of your project.
17+
18+
2. Include the exact paths to these font files in the customFonts list for proper referencing. This ensures that Pdfium can utilize these fonts as needed.
19+
20+
![CustomFonts in Blazor PDFViewer](../../pdfviewer/images/customfont-files.png)
21+
22+
The following code demonstrates how to load the CustomFonts to PDF Viewer.
23+
24+
```cshtml
25+
26+
<SfPdfViewer2 DocumentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
27+
Height="100%"
28+
Width="100%" CustomFonts="@customFonts">
29+
</SfPdfViewer2>
30+
31+
32+
@code {
33+
34+
public List<string> customFonts = new List<string> { "wwwroot/SIMSUN.TTC", "wwwroot/SIMSUNB.TTF"}
35+
36+
}
37+
38+
```
39+
Below code snippet illustrates how to load a CustomFonts using a CDN link.
40+
41+
```cshtml
42+
43+
<SfPdfViewer2 DocumentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
44+
Height="100%"
45+
Width="100%" CustomFonts="@customFonts">
46+
</SfPdfViewer2>
47+
48+
49+
@code {
50+
51+
public List<string> customFonts = new List<string> { "https://cdn.jsdelivr.net/npm/[email protected]/fonts/arial-geo-bold-webfont.ttf" };
52+
53+
}
54+
55+
```
56+
[View sample in GitHub](https://github.com/SyncfusionExamples/blazor-pdf-viewer-examples/tree/master/Load%20and%20Save/Load%20CustomFonts%20pdfium).
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
layout: post
3+
title: Optimize PDF Scrolling with the OverscanCount | Syncfusion
4+
description: Learn here all about OverscanCount in Blazor application in Syncfusion Blazor SfPdfViewer component and more.
5+
platform: Blazor
6+
control: SfPdfViewer
7+
documentation: ug
8+
---
9+
10+
# Optimize PDF Scrolling with the OverscanCount
11+
12+
The [OverscanCount](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_OverscanCount) feature in a PDF Viewer allows users to preload a specified number of pages before and after the visible view port when opening a PDF document, thereby enhance the scrolling experience.
13+
14+
To utilize this capability in Syncfusion PDF Viewer, adjust the OverscanCount property. By setting this property to a desired number, users can preload pages adjacent to the active page. This ensures quicker access to specific pages without waiting for the entire document to load.
15+
16+
Below is a code snippet illustrating how to implement the OverscanCount:
17+
18+
```cshtml
19+
20+
<SfPdfViewer2 DocumentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
21+
Height="100%"
22+
Width="100%" OverscanCount="10">
23+
</SfPdfViewer2>
24+
25+
```
26+
[View sample in GitHub](https://github.com/SyncfusionExamples/blazor-pdf-viewer-examples/tree/master/Load%20and%20Save/Load%20OverscanCount).
29.1 KB
Loading
-8.94 KB
Loading
-14.5 KB
Loading
-15.8 KB
Loading
38.8 KB
Loading
-16.8 KB
Loading

0 commit comments

Comments
 (0)