Skip to content

Commit c570597

Browse files
committed
982436: Update UG Documentation for Secure Word Import and Export Header Support in Blazor
1 parent 0b2aa16 commit c570597

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

blazor/rich-text-editor/import-export.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,9 @@ public WordDocument GetDocument(string htmlText)
422422

423423
N> [View Sample in GitHub](https://github.com/SyncfusionExamples/blazor-rich-text-editor-export-to-html).
424424

425-
## Securely Export Word or PDF Documents with Authentication
425+
## Securely Export Word or Pdf Documents with Authentication
426426

427-
You can include custom data when exporting Word or PDF documents, such as authentication tokens or other parameters. Use the OnExport event with its `CurrentRequest` and `CustomFormData` properties to send these values to the server. On the server side, the authentication token can be read from the request headers, and the custom data can be accessed from the request body, which contains the values sent via a POST request.
427+
You can include custom data when exporting Word or PDF documents, such as authentication tokens or other parameters. Use the `OnExport` event with its `CurrentRequest` and `CustomFormData` properties to send these values to the server. On the server side, the authentication token can be read from the request headers, and the custom data can be accessed from the request body, which contains the values sent via a POST request.
428428

429429
The following example demonstrates how to pass authentication tokens and custom data during export:
430430

@@ -448,7 +448,7 @@ The following example demonstrates how to pass authentication tokens and custom
448448
};
449449
private void Export(ExportingEventArgs args)
450450
{
451-
// Assign different authentication tokens depending on the export type (PDF or Word)
451+
// Assign different authentication tokens depending on the export type (Pdf or Word)
452452
var token = (args.ExportType == "Pdf" ? "Pdf Bearer token" : "Word Bearer token");
453453
args.CurrentRequest = new Dictionary<string, string>
454454
{
@@ -488,8 +488,8 @@ namespace ExportService.Controllers
488488
}
489489
public class ExportParam
490490
{
491-
public string? html { get; set; }
492-
public object? formData { get; set; }
491+
public string? Html { get; set; }
492+
public object? FormData { get; set; }
493493
}
494494
[AcceptVerbs("Post")]
495495
[EnableCors("AllowAllOrigins")]
@@ -500,8 +500,8 @@ namespace ExportService.Controllers
500500
var authorization = Request.Headers["Authorization"].ToString();
501501
// Access custom form data from the request body
502502
Console.WriteLine("Authorization: " + authorization);
503-
Console.WriteLine("Form Data: " + args.formData);
504-
Console.WriteLine("HTML Content: " + args.html);
503+
Console.WriteLine("Form Data: " + args.FormData);
504+
Console.WriteLine("HTML Content: " + args.Html);
505505
// Your export logic here
506506
// Validate token, process formData, generate PDF, etc.
507507
return Ok();

0 commit comments

Comments
 (0)