Skip to content

Commit 1e5b219

Browse files
984774: Changes for the correction in smart pdfviewer documentation
1 parent 3908e16 commit 1e5b219

File tree

7 files changed

+39
-34
lines changed

7 files changed

+39
-34
lines changed

Document-Processing/PDF/Smart-PDF-Viewer/blazor/custom-ai-service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The following examples demonstrate AI services integrated using the `IChatInfere
4343

4444
## Service Registration
4545

46-
Register the custom implementation in `Program.cs`:
46+
Register the custom implementation in **Program.cs**:
4747

4848
```csharp
4949
using Syncfusion.Blazor.AI;

Document-Processing/PDF/Smart-PDF-Viewer/blazor/document-summarizer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ N> [View sample in GitHub](https://github.com/SyncfusionExamples/blazor-smart-pd
371371

372372
## Integration Notes
373373

374-
To apply these templates, include them within the [`AssistViewSettings`]((https://help.syncfusion.com//cr/blazor/Syncfusion.Blazor.SmartPdfViewer.AssistViewSettings.html)) of the [`SfSmartPdfViewer`](https://help.syncfusion.com//cr/blazor/Syncfusion.Blazor.SmartPdfViewer.SfSmartPdfViewer.html).
374+
To apply these templates, include them within the [AssistViewSettings]((https://help.syncfusion.com//cr/blazor/Syncfusion.Blazor.SmartPdfViewer.AssistViewSettings.html)) of the [SfSmartPdfViewer](https://help.syncfusion.com//cr/blazor/Syncfusion.Blazor.SmartPdfViewer.SfSmartPdfViewer.html).
375375

376376
## See also
377377

Document-Processing/PDF/Smart-PDF-Viewer/blazor/faqs/how-to-use-user-token-with-custom-ai-service.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ After completing this setup, you can:
2828
The `UserTokenService` is responsible for generating and managing per-user quotas. These tokens are used to authenticate and throttle requests to the custom Azure OpenAI service based on user identity.
2929

3030
### Implementation Steps
31-
1. Create a new class file named `UserTokenService.cs` in your project
31+
1. Create a new class file named **UserTokenService.cs** in your project
3232
2. Add the following implementation:
3333

3434
{% tabs %}
@@ -156,7 +156,7 @@ public class UserTokenInfo
156156
## Step 2: Implement User Token API Controller
157157
The `UserTokensController` class exposes endpoints to check and update user tokens. This enables secure and dynamic quota tracking for users interacting with the custom Azure OpenAI service.
158158

159-
1. Create a new class file named `UserTokensController.cs` in your project
159+
1. Create a new class file named **UserTokensController.cs** in your project
160160
2. Add the following implementation:
161161

162162
{% tabs %}
@@ -215,7 +215,7 @@ The Syncfusion Smart PDF Viewer is designed to work with different AI backends t
215215

216216
The `IChatInferenceService` interface is the bridge between Syncfusion Smart PDF Viewer and AI services:
217217

218-
1. Create a new file named `AzureAIService.cs`
218+
1. Create a new file named **AzureAIService.cs**
219219
2. Add the following implementation:
220220

221221
{% tabs %}
@@ -324,13 +324,13 @@ public class AzureAIService : IChatInferenceService
324324
{% endhighlight %}
325325
{% endtabs %}
326326

327-
## Step 4: Add a script file to your application and refer it to the head tag.
327+
## Step 4: Add a script file to your application and refer it to the body tag.
328328

329329
```cshtml
330330
331-
<head>
331+
<body>
332332
<script src="index.js" type="text/javascript"></script>
333-
</head>
333+
</body>
334334
335335
```
336336
## Step 5: Add the following code to render the JS component in the blazor to the newly added JS file.

Document-Processing/PDF/Smart-PDF-Viewer/blazor/getting-started/maui-blazor-app.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To add NuGet packages into the Blazor Maui app, open the NuGet package manager i
2626
Alternatively, you can utilize the following package manager command to achieve the same.
2727

2828
{% tabs %}
29-
{% highlight razor tabtitle="Package Manager" %}
29+
{% highlight c# tabtitle="Package Manager" %}
3030

3131
Install-Package Syncfusion.Blazor.SfSmartPdfViewer -Version {{ site.releaseversion }}
3232
Install-Package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }}
@@ -88,7 +88,7 @@ public static class MauiProgram
8888
{% endhighlight %}
8989
{% endtabs %}
9090

91-
Note: Ensure the Syncfusion license is registered in the application before using Syncfusion components.
91+
N> Ensure the Syncfusion license is registered in the application before using Syncfusion components.
9292

9393
## To Configure Azure OpenAI Service
9494

@@ -97,7 +97,7 @@ This article is required only when enabling AI-powered features in Smart PDF Vie
9797
In **Visual Studio**, Go to Tools → NuGet Package Manager → Package Manager Console. Run these commands one by one:
9898

9999
{% tabs %}
100-
{% highlight razor tabtitle="Package Manager" %}
100+
{% highlight c# tabtitle="Package Manager" %}
101101

102102
Install-Package Azure.AI.OpenAI
103103
Install-Package Microsoft.Extensions.AI
@@ -109,7 +109,7 @@ Install-Package Microsoft.Extensions.AI.OpenAI -Version 9.8.0-preview.1.25412.6
109109
In **Visual Studio Code**, open the terminal and run these commands:
110110

111111
{% tabs %}
112-
{% highlight razor tabtitle="Package Manager" %}
112+
{% highlight c# tabtitle="Package Manager" %}
113113

114114
dotnet add package Azure.AI.OpenAI
115115
dotnet add package Microsoft.Extensions.AI
@@ -121,7 +121,7 @@ dotnet add package Microsoft.Extensions.AI.OpenAI --version 9.8.0-preview.1.2541
121121
To configure the AI service, add the following settings to the **~/MauiProgram.cs** file in your Blazor Server app.
122122

123123
{% tabs %}
124-
{% highlight razor tabtitle="Blazor Server App" hl_lines="10 11 12 13 14 15 17" %}
124+
{% highlight c# tabtitle="Blazor Server App" hl_lines="10 11 12 13 14 15 17" %}
125125

126126
using Azure.AI.OpenAI;
127127
using Microsoft.Extensions.AI;
@@ -159,14 +159,18 @@ For **Azure OpenAI**, first [deploy an Azure OpenAI Service resource and model](
159159
Add the following stylesheet and script to the head section of the **~/wwwroot/index.html** file.
160160

161161
{% tabs %}
162-
{% highlight html %}
162+
{% highlight html hl_lines="3 7" %}
163163

164164
<head>
165+
....
165166
<!-- Syncfusion Blazor Smart PDF Viewer control's theme style sheet -->
166-
<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" />
167+
<link href="_content/Syncfusion.Blazor.Themes/fluent2.css" rel="stylesheet" />
168+
</head>
169+
<body>
170+
....
167171
<!-- Syncfusion Blazor Smart PDF Viewer control's scripts -->
168172
<script src="_content/Syncfusion.Blazor.SfSmartPdfViewer/scripts/syncfusion-blazor-sfsmartpdfviewer.min.js" type="text/javascript"></script>
169-
</head>
173+
</body>
170174

171175
{% endhighlight %}
172176
{% endtabs %}
@@ -261,5 +265,4 @@ N> If any errors occur while using the Android Emulator, see [Troubleshooting th
261265

262266
* [Document Summarizer in Blazor Smart PDF Viewer](../document-summarizer)
263267
* [Smart Redaction in Blazor Smart PDF Viewer](../smart-redaction)
264-
* [Smart Fill in Blazor Smart PDF Viewer](../smart-fill).
265-
* [Render PDF Document from embedded source in the MAUI Android app](../how-to/deploy-maui-using-android-emulator).
268+
* [Smart Fill in Blazor Smart PDF Viewer](../smart-fill)

Document-Processing/PDF/Smart-PDF-Viewer/blazor/getting-started/web-app.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ To add the **Blazor Smart PDF Viewer** component, open the NuGet Package Manager
3333
Alternatively, use the following package manager commands.
3434

3535
{% tabs %}
36-
{% highlight razor tabtitle="Package Manager" %}
36+
{% highlight c# tabtitle="Package Manager" %}
3737

3838
Install-Package Syncfusion.Blazor.SfSmartPdfViewer -Version {{ site.releaseversion }}
3939
Install-Package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }}
@@ -67,7 +67,6 @@ For example, in a Blazor Web App with the `Server` interactive render mode, use
6767

6868
dotnet new blazor -o BlazorWebApp -int Server
6969
cd BlazorWebApp
70-
cd BlazorWebApp.Client
7170

7271
{% endhighlight %}
7372
{% endtabs %}
@@ -83,10 +82,10 @@ When using the `Server` render mode in a Blazor Web App, install the Syncfusion<
8382
* Run the following commands to install `Syncfusion.Blazor.SfSmartPdfViewer` and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/), then restore the solution.
8483

8584
{% tabs %}
86-
{% highlight razor tabtitle="Package Manager" %}
85+
{% highlight c# tabtitle="Package Manager" %}
8786

88-
dotnet add package Syncfusion.Blazor.SfSmartPdfViewer -v 31.2.*
89-
dotnet add package Syncfusion.Blazor.Themes -v 31.2.*
87+
dotnet add package Syncfusion.Blazor.SfSmartPdfViewer -v {{ site.releaseversion }}
88+
dotnet add package Syncfusion.Blazor.Themes -v {{ site.releaseversion }}
9089
dotnet restore
9190

9291
{% endhighlight %}
@@ -118,7 +117,7 @@ Import the [Syncfusion.Blazor](https://help.syncfusion.com/cr/blazor/Syncfusion.
118117
If the **Interactive Render Mode** is set to `Server`, the project contains a single **~/Program.cs** file. Register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor service in that **~/Program.cs** file. The configured SignalR maximum message size and memory cache support large document streaming and caching for better performance. Ensure the Syncfusion license is registered during application startup.
119118

120119
{% tabs %}
121-
{% highlight razor tabtitle="Blazor Server App" hl_lines="5 7 10" %}
120+
{% highlight c# tabtitle="~/Program.cs" hl_lines="5 7 10" %}
122121

123122
using Syncfusion.Blazor;
124123

@@ -142,7 +141,7 @@ var app = builder.Build();
142141
In **Visual Studio**, Go to Tools → NuGet Package Manager → Package Manager Console. Run these commands one by one:
143142

144143
{% tabs %}
145-
{% highlight razor tabtitle="Package Manager" %}
144+
{% highlight c# tabtitle="Package Manager" %}
146145

147146
Install-Package Azure.AI.OpenAI
148147
Install-Package Microsoft.Extensions.AI
@@ -154,7 +153,7 @@ Install-Package Microsoft.Extensions.AI.OpenAI -Version 9.8.0-preview.1.25412.6
154153
In **Visual Studio Code**, open the terminal in VS Code and run the following commands:
155154

156155
{% tabs %}
157-
{% highlight razor tabtitle="Package Manager" %}
156+
{% highlight C# tabtitle="Package Manager" %}
158157

159158
dotnet add package Azure.AI.OpenAI
160159
dotnet add package Microsoft.Extensions.AI
@@ -166,7 +165,7 @@ dotnet add package Microsoft.Extensions.AI.OpenAI --version 9.8.0-preview.1.2541
166165
To configure the AI service, add the following settings to the **~/Program.cs** file in the Blazor Server app.
167166

168167
{% tabs %}
169-
{% highlight razor tabtitle="Blazor Server App" hl_lines="10 11 12 13 14 15 17" %}
168+
{% highlight C# tabtitle="~/Program.cs" hl_lines="10 11 12 13 14 15 17" %}
170169

171170
using Azure.AI.OpenAI;
172171
using Microsoft.Extensions.AI;
@@ -238,7 +237,7 @@ dotnet add package OllamaSharp --version 5.3.6
238237
Add the following settings to the **~/Program.cs** file in the Blazor Server app.
239238

240239
{% tabs %}
241-
{% highlight razor tabtitle="Blazor Server App" hl_lines="11 14 15 16 17 18 21 22 23" %}
240+
{% highlight c# tabtitle="~/Program.cs" hl_lines="11 14 15 16 17 18 21 22 23" %}
242241

243242
using Microsoft.Extensions.AI;
244243
using OllamaSharp;
@@ -286,19 +285,22 @@ curl http://localhost:11434/api/tags
286285
The theme stylesheet and script can be accessed from NuGet through [Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets). Include the stylesheet reference in the `<head>` section and the script reference at the end of the `<body>` in the ~/Components/App.razor file as shown below.
287286

288287

289-
```html
288+
{% tabs %}
289+
{% highlight html hl_lines="3 7" %}
290+
290291
<head>
291292
....
292293
<!-- Syncfusion Blazor Smart PDF Viewer control's theme style sheet -->
293294
<link href="_content/Syncfusion.Blazor.Themes/fluent2.css" rel="stylesheet" />
294295
</head>
295-
296296
<body>
297297
....
298298
<!-- Syncfusion Blazor Smart PDF Viewer control's scripts -->
299299
<script src="_content/Syncfusion.Blazor.SfSmartPdfViewer/scripts/syncfusion-blazor-sfsmartpdfviewer.min.js" type="text/javascript"></script>
300300
</body>
301-
```
301+
302+
{% endhighlight %}
303+
{% endtabs %}
302304

303305
N> Review the [Blazor Themes](https://blazor.syncfusion.com/documentation/appearance/themes) topic to discover various methods ([Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets), [CDN](https://blazor.syncfusion.com/documentation/appearance/themes#cdn-reference), and [CRG](https://blazor.syncfusion.com/documentation/common/custom-resource-generator)) for referencing themes in a Blazor application. Also see [Adding script reference](https://blazor.syncfusion.com/documentation/common/adding-script-references) for different approaches to include scripts.
304306

Document-Processing/PDF/Smart-PDF-Viewer/blazor/getting-started/winforms-blazor-app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ dotnet add package Microsoft.Extensions.AI.OpenAI --version 9.8.0-preview.1.2541
173173
Register Syncfusion Blazor services and BlazorWebView in **~/Form1.cs** so that the WinForms window can host Blazor components.
174174

175175
{% tabs %}
176-
{% highlight c# tabtitle="Form1.cs (WinForms host)" hl_lines="2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 31" %}
176+
{% highlight c# tabtitle="Form1.cs (WinForms host)" hl_lines="2 3 4 5 6 7 8 9 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 31" %}
177177

178178
namespace WinFormsBlazorHybridApp;
179179
using Microsoft.AspNetCore.Components.WebView.WindowsForms;

Document-Processing/PDF/Smart-PDF-Viewer/blazor/getting-started/wpf-blazor-app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ dotnet add package Microsoft.Extensions.AI.OpenAI --version 9.8.0-preview.1.2541
142142
Register Syncfusion Blazor services, AI services and BlazorWebView in **~/MainWindow.xaml.cs** so that the WPF window can host Blazor components.
143143

144144
{% tabs %}
145-
{% highlight c# tabtitle="MainWindow.xaml.cs (WPF host)" hl_lines="2 3 4 5 6 7 10 11 12 13 14 15 16 17 18 19 20 21 22" %}
145+
{% highlight c# tabtitle="MainWindow.xaml.cs (WPF host)" hl_lines="2 3 4 5 6 7 10 11 12 13 14 15 16 17 18 19 20 21" %}
146146

147147
....
148148
using Microsoft.Extensions.DependencyInjection;
@@ -184,7 +184,7 @@ For **Azure OpenAI**, first [deploy an Azure OpenAI Service resource and model](
184184
* Inside wwwroot, create an index.html host page for the Blazor UI. This host page is required by BlazorWebView to initialize the Blazor runtime and load static assets (themes and scripts). A basic index.html might look like the following:
185185

186186
{% tabs %}
187-
{% highlight html tabtitle="wwwroot/index.html" hl_lines="8 13" %}
187+
{% highlight html tabtitle="index.html" hl_lines="8 13" %}
188188

189189
<!DOCTYPE html>
190190
<html>

0 commit comments

Comments
 (0)