Skip to content

Commit 6fa9c9f

Browse files
Merge branch 'ES-987016-DocumentCorrection' of https://github.com/syncfusion-content/document-processing-docs into ES-987016-DocumentCorrection
2 parents 2157a41 + 3b0b5fe commit 6fa9c9f

File tree

84 files changed

+382
-440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+382
-440
lines changed

Document-Processing-toc.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2478,7 +2478,18 @@
24782478
<li><a href="/document-processing/word/word-processor/asp-net-mvc/overview">Overview</a></li>
24792479
<li><a href="/document-processing/word/word-processor/asp-net-mvc/getting-started">Getting Started</a></li>
24802480
<li><a href="/document-processing/word/word-processor/asp-net-mvc/feature-module">Feature modules</a></li>
2481-
<li><a href="/document-processing/word/word-processor/asp-net-mvc/import">Import</a></li>
2481+
<li>
2482+
<a href="/document-processing/word/word-processor/asp-net-mvc/import">Opening Document</a>
2483+
<ul>
2484+
<li><a href="/document-processing/word/word-processor/asp-net-mvc/opening-documents/azure-blob-storage">From Microsoft Azure Blob Storage</a></li>
2485+
<li><a href="/document-processing/word/word-processor/asp-net-mvc/opening-documents/aws-s3-bucket">From AWS S3</a></li>
2486+
<li><a href="/document-processing/word/word-processor/asp-net-mvc/opening-documents/box-cloud-file-storage">From Box cloud file storage</a></li>
2487+
<li><a href="/document-processing/word/word-processor/asp-net-mvc/opening-documents/dropbox-cloud-file-storage">From Dropbox cloud file storage</a></li>
2488+
<li><a href="/document-processing/word/word-processor/asp-net-mvc/opening-documents/google-cloud-storage">From Google Cloud Storage</a></li>
2489+
<li><a href="/document-processing/word/word-processor/asp-net-mvc/opening-documents/google-drive">From Google Drive</a></li>
2490+
<li><a href="/document-processing/word/word-processor/asp-net-mvc/opening-documents/one-drive">From One Drive</a></li>
2491+
</ul>
2492+
</li>
24822493
<li><a href="/document-processing/word/word-processor/asp-net-mvc/export">Export</a></li>
24832494
<li><a href="/document-processing/word/word-processor/asp-net-mvc/collaborative-editing/overview">Collaborative Editing</a>
24842495
<ul>

Document-Processing/PDF/PDF-Library/NET/Working-with-Flow-Layout.md

Lines changed: 60 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ PdfDocument pdfDocument = render.ConvertToPDF(wordDocument);
9090
render.Dispose();
9191
wordDocument.Dispose();
9292

93-
//Save the document into stream.
94-
MemoryStream stream = new MemoryStream();
95-
pdfDocument.Save(stream);
96-
//Close the documents.
93+
//Save and close the PDF document.
94+
pdfDocument.Save("Output.pdf");
9795
pdfDocument.Close(true);
96+
//Close the document.
97+
wordDocument.Close();
9898
{% endhighlight %}
9999

100100
{% highlight c# tabtitle="C# [Windows-specific]" %}
@@ -180,6 +180,11 @@ You can create PDF document with text and image using the following code snippet
180180

181181
{% tabs %}
182182
{% highlight c# tabtitle="C# [Cross-platform]" %}
183+
184+
using Syncfusion.Pdf;
185+
using Syncfusion.DocIO.DLS;
186+
using Syncfusion.DocToPDFConverter;
187+
183188
//A new document is created.
184189
WordDocument document = new WordDocument();
185190
//Adding a new section to the document.
@@ -230,15 +235,18 @@ PdfDocument pdfDocument = render.ConvertToPDF(document);
230235
render.Dispose();
231236
document.Dispose();
232237

233-
//Save the document into stream.
234-
MemoryStream stream = new MemoryStream();
235-
pdfDocument.Save(stream);
236-
//Close the documents.
238+
//Saves the PDF file.
239+
pdfDocument.Save("Sample.pdf");
237240
pdfDocument.Close(true);
241+
document.Close();
238242
{% endhighlight %}
239243

240244
{% highlight c# tabtitle="C# [Windows-specific]" %}
241245

246+
using Syncfusion.Pdf;
247+
using Syncfusion.DocIO.DLS;
248+
using Syncfusion.DocToPDFConverter;
249+
242250
//A new document is created.
243251
WordDocument document = new WordDocument();
244252
//Adding a new section to the document.
@@ -293,6 +301,11 @@ document.Close();
293301
{% endhighlight %}
294302

295303
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
304+
305+
Imports Syncfusion.DocIO.DLS
306+
Imports Syncfusion.DocToPDFConverter
307+
Imports Syncfusion.Pdf
308+
296309
'A new document is created
297310
Dim document As New WordDocument()
298311
'Adding a new section to the document
@@ -355,6 +368,11 @@ You can create PDF document with simple table using the following code snippet.
355368

356369
{% tabs %}
357370
{% highlight c# tabtitle="C# [Cross-platform]" %}
371+
372+
using Syncfusion.Pdf;
373+
using Syncfusion.DocIO.DLS;
374+
using Syncfusion.DocToPDFConverter;
375+
358376
//Creates a new Word document.
359377
WordDocument wordDocument = new WordDocument();
360378
//Adding a new section to the document.
@@ -424,15 +442,19 @@ PdfDocument pdfDocument = render.ConvertToPDF(wordDocument);
424442
render.Dispose();
425443
wordDocument.Dispose();
426444

427-
//Save the document into stream.
428-
MemoryStream stream = new MemoryStream();
429-
pdfDocument.Save(stream);
430-
//Close the documents.
445+
//Save and close the PDF document.
446+
pdfDocument.Save("Output.pdf");
431447
pdfDocument.Close(true);
448+
//Close the document.
449+
wordDocument.Close();
432450
{% endhighlight %}
433451

434452
{% highlight c# tabtitle="C# [Windows-specific]" %}
435453

454+
using Syncfusion.Pdf;
455+
using Syncfusion.DocIO.DLS;
456+
using Syncfusion.DocToPDFConverter;
457+
436458
//Creates a new Word document.
437459
WordDocument wordDocument = new WordDocument();
438460
//Adding a new section to the document.
@@ -508,6 +530,11 @@ wordDocument.Close();
508530
{% endhighlight %}
509531

510532
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
533+
534+
Imports Syncfusion.DocIO.DLS
535+
Imports Syncfusion.DocToPDFConverter
536+
Imports Syncfusion.Pdf
537+
511538
'Creates a new Word document
512539
Dim wordDocument As New WordDocument()
513540
'Adding a new section to the document
@@ -593,7 +620,13 @@ Syncfusion Essential<sup>&reg;</sup> PDF supports creating a PDF document with f
593620
The following code snippet explains how to create a PDF document with image, paragraph text, header text, a line below the header text, and a table using flow model.
594621

595622
{% tabs %}
596-
{% highlight c# tabtitle="C#" %}
623+
{% highlight c# tabtitle="C# [Cross-platform]" %}
624+
625+
using Syncfusion.Drawing;
626+
using Syncfusion.Pdf;
627+
using Syncfusion.Pdf.Graphics;
628+
using Syncfusion.Pdf.Grid;
629+
597630
//Create a new PDF document.
598631
PdfDocument document = new PdfDocument();
599632
//Add a page to the document.
@@ -650,15 +683,20 @@ grid.ApplyBuiltinStyle(PdfGridBuiltinStyle.GridTable5DarkAccent5);
650683
//Draw the table in page, below the line with a height gap of 20.
651684
grid.Draw(page, new PointF(0, layoutResult.Bounds.Bottom + 20));
652685

653-
//Saving the PDF to the MemoryStream.
654-
MemoryStream stream = new MemoryStream();
655-
document.Save(stream);
686+
//Save the PDF document.
687+
document.Save("Output.pdf");
656688
//Close the instance of PdfDocument.
657689
document.Close(true);
690+
658691
{% endhighlight %}
659692

660693
{% highlight c# tabtitle="C# [Windows-specific]" %}
661694

695+
using System.Drawing;
696+
using Syncfusion.Pdf;
697+
using Syncfusion.Pdf.Graphics;
698+
using Syncfusion.Pdf.Grid;
699+
662700
//Create a new PDF document.
663701
PdfDocument document = new PdfDocument();
664702
//Add a page to the document.
@@ -722,6 +760,12 @@ document.Close(true);
722760
{% endhighlight %}
723761

724762
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
763+
764+
Imports System.Drawing
765+
Imports Syncfusion.Pdf
766+
Imports Syncfusion.Pdf.Graphics
767+
Imports Syncfusion.Pdf.Grid
768+
725769
'Create a new PDF document
726770
Dim document As PdfDocument = New PdfDocument
727771
'Add a page to the document

Document-Processing/PDF/PDF-Viewer/blazor/faqs/how-to-configure-content-security-policy.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ When enforcing a strict [Content Security Policy (CSP)](https://csp.withgoogle.c
1919

2020
* The SfPdfViewer uses web workers and makes network requests. Allow these by adding [`worker-src 'self' blob:`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/worker-src) and [`connect-src 'self' https://cdn.syncfusion.com data:`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src).
2121

22-
* For JavaScript execution and WebAssembly, include [`script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.syncfusion.com blob:`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src) to allow inline scripts, eval, and blob-based scripts.
22+
* For JavaScript execution and WebAssembly, include [`script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval' https://cdn.syncfusion.com blob:`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src) to allow inline scripts, eval, and blob-based scripts.
2323

2424
Include the following meta tag inside the `<head>` element to address CSP violations when using the SfPdfViewer with material and tailwind themes.
2525

@@ -28,7 +28,7 @@ Include the following meta tag inside the `<head>` element to address CSP violat
2828
<head>
2929
<meta http-equiv="Content-Security-Policy" content="default-src 'self';
3030
frame-src 'self' blob:;
31-
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.syncfusion.com blob:;
31+
script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval' https://cdn.syncfusion.com blob:;
3232
style-src 'self' 'unsafe-inline' blob: https://cdn.syncfusion.com https://fonts.googleapis.com;
3333
img-src 'self' blob: data:;
3434
worker-src 'self' blob:;
@@ -38,14 +38,19 @@ Include the following meta tag inside the `<head>` element to address CSP violat
3838
{% endhighlight %}
3939
{% endtabs %}
4040

41-
N> The SfPdfViewer requires `unsafe-eval` in the `script-src` directive for JavaScript execution and WebAssembly operations. The `worker-src` directive is also required for web worker functionality. Ensure these directives are present for correct behavior under strict CSP.
41+
N>The `SfPdfViewer` component requires specific Content Security Policy (CSP) directives to function properly in Blazor WebAssembly applications.
42+
- In **.NET 9.0**, include `'wasm-unsafe-eval'` in the `script-src` directive to support WebAssembly operations.
43+
- In **.NET 8.0**, you must also include `'unsafe-eval'` in the `script-src` directive to avoid runtime errors caused by restricted dynamic JavaScript execution.
44+
- Ensure the `worker-src` directive includes `'self'` and `blob:` to enable web worker functionality.
45+
These directives are essential for correct behavior under strict CSP environments.
46+
4247

4348
### Directive usage
4449

4550
| Directive | Usage |
4651
|------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
4752
| `default-src 'self';` | Sets the default policy for loading resources. `'self'` means only allow resources from the same origin (same domain). |
48-
| `script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.syncfusion.com blob:;` | Defines where JavaScript code can come from. `'self'` allows scripts from the same origin. `'unsafe-inline'` allows inline scripts. `'unsafe-eval'` allows eval() operations needed for WebAssembly. `blob:` allows loading scripts from Blob URLs. |
53+
| `script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval' https://cdn.syncfusion.com blob:;` | Defines where JavaScript code can come from. `'self'` allows scripts from the same origin. `'unsafe-inline'` allows inline scripts. `'wasm-unsafe-eval'` allows eval() operations for WebAssembly in **.NET 9.0**. `'unsafe-eval'` allows eval() operations for WebAssembly in **.NET 8.0**. `blob:` allows loading scripts from Blob URLs. |
4954
| `worker-src 'self' blob:;` | Controls where workers can be loaded from. `'self'` allows same-origin workers. `blob:` allows blob-based workers, common in PDF viewers and heavy JS applications. |
5055
| `connect-src 'self' https://cdn.syncfusion.com data:;` | Controls where the application can make network requests, such as `fetch()`, XHR, and WebSockets. `'self'` restricts to the same origin, with additional allowances for Syncfusion CDN and data URLs. |
5156
| `style-src 'self' 'unsafe-inline' blob: https://cdn.syncfusion.com https://fonts.googleapis.com;` | Defines the sources for stylesheets. `'self'` restricts to the same origin. `'unsafe-inline'` allows inline styles. `blob:` allows dynamically generated styles. External font CDNs are also allowed. |

Document-Processing/Word/Word-Processor/angular/opening-documents/aws-s3-bucket.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
layout: post
3-
title: Open document from AWS S3 in Angular Document editor control | Syncfusion
3+
title: Open document from AWS S3 in Angular Document editor | Syncfusion
44
description: Learn about how to Open document from AWS S3 in Angular Document editor control of Syncfusion Essential JS 2 and more details.
55
platform: document-processing
66
control: Open document from AWS S3
77
documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Open document from AWS S3
11+
# Open document from AWS S3 in Angular Document editor
1212

1313
To load a document from AWS S3 in a Document Editor, you can follow the steps below
1414

Document-Processing/Word/Word-Processor/angular/opening-documents/azure-blob-storage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
layout: post
3-
title: Open document from Azure Blob Storage in Angular Document editor control | Syncfusion
3+
title: Open document from Azure Blob in Angular Document editor | Syncfusion
44
description: Learn about how to Open document from Azure Blob Storage in Angular Document editor control of Syncfusion Essential JS 2 and more details.
55
platform: document-processing
66
control: Open document from Azure Blob Storage
77
documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Open document from Azure Blob Storage
11+
# Open document from Azure Blob Storage in Angular Document editor
1212

1313
To load document from Azure Blob Storage in a Document Editor, you can follow the steps below
1414

Document-Processing/Word/Word-Processor/angular/opening-documents/box-cloud-file-storage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
layout: post
3-
title: Opening the document from Box cloud file storage in Syncfusion Angular Document editor control | Syncfusion
3+
title: Open Box Cloud Files in Angular Document Editor | Syncfusion
44
description: Learn here to open a document from Box cloud file storage in Syncfusion Angular Document editor control of Syncfusion Essential JS 2 and more.
55
platform: document-processing
66
control: Opening from Box cloud file storage
77
documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Open document from Box cloud file storage
11+
# Open document from Box cloud file storage in Angular Document editor
1212

1313
To load a document from Box cloud file storage in a document Editor, you can follow the steps below
1414

Document-Processing/Word/Word-Processor/angular/opening-documents/dropbox-cloud-file-storage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
layout: post
3-
title: Open document from Dropbox cloud file storage in Angular Document editor control | Syncfusion
3+
title: Open Dropbox Files in Angular Document Editor | Syncfusion
44
description: Learn about how to Open document from Dropbox cloud file storage in Angular Document editor control of Syncfusion Essential JS 2 and more details.
55
platform: document-processing
66
control: Open document from Dropbox cloud file storage
77
documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Open document from Dropbox cloud file storage
11+
# Open document from Dropbox cloud file storage
1212

1313
To load a document from Dropbox cloud file storage in a Document editor, you can follow the steps below
1414

Document-Processing/Word/Word-Processor/angular/opening-documents/google-cloud-storage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
layout: post
3-
title: Open document from Google Cloud Storage in Angular Document editor control | Syncfusion
3+
title: Open Google Cloud Files in Angular Document Editor | Syncfusion
44
description: Learn about how to Open document from Google Cloud Storage in Angular Document editor control of Syncfusion Essential JS 2 and more details.
55
platform: document-processing
66
control: Open document from Google Cloud Storage
77
documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Open document from Google Cloud Storage
11+
# Open document from Google Cloud Storage in Angular Document editor
1212

1313
To load a document from Google Cloud Storage in a Document editor, you can follow the steps below
1414

Document-Processing/Word/Word-Processor/angular/opening-documents/google-drive.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
layout: post
3-
title: Open document from Google Drive in Angular Document editor control | Syncfusion
3+
title: Open Google Drive Files in Angular Document Editor | Syncfusion
44
description: Learn about how to Open document from Google Drive in Angular Document editor control of Syncfusion Essential JS 2 and more details.
55
platform: document-processing
66
control: Open document from Google Drive
77
documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Open document from Google Drive
11+
# Open document from Google Drive in Angular Document editor
1212

1313
To load a document from Google Drive in a Document editor, you can follow the steps below
1414

Document-Processing/Word/Word-Processor/angular/opening-documents/one-drive.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
layout: post
3-
title: Open document from One Drive in Angular Document editor control | Syncfusion
3+
title: Open document from One Drive in Angular Document editor | Syncfusion
44
description: Learn about how to Open document from One Drive in Angular Document editor control of Syncfusion Essential JS 2 and more details.
55
platform: document-processing
66
control: Open document from One Drive
77
documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Open document from One Drive
11+
# Open document from One Drive in Angular Document editor
1212

1313
To load a document from One Drive in a Document editor, you can follow the steps below
1414

@@ -124,12 +124,12 @@ public async Task<string> LoadFromOneDrive([FromBody] Dictionary<string, string>
124124
"AllowedHosts": "*",
125125
"TenantId": "Your_Tenant_ID",
126126
"applApplicationIdicationId": "Your_Application_ID",
127-
"FolderName": "Your_Folder_Name_To_Access_The_Files_In_Onedrive"
127+
"FolderName": "Your_Folder_Name_To_Access_The_Files_In_OneDrive"
128128
}
129129

130130
```
131131

132-
> Replace **Your_Tenant_ID**, **Your_Application_ID**, and **Your_Folder_Name_To_Access_The_Files_In_Onedrive** with your actual tenant ID, application ID, and folder name.
132+
> Replace **Your_Tenant_ID**, **Your_Application_ID**, and **Your_Folder_Name_To_Access_The_Files_In_OneDrive** with your actual tenant ID, application ID, and folder name.
133133
134134
**Step 4:** Modify the index File in the Document Editor sample
135135

0 commit comments

Comments
 (0)