Skip to content

Commit c1fed9c

Browse files
committed
Merge branch 'hotfix/hotfix-v31.2.2' of https://github.com/syncfusion-content/document-processing-docs into 986143-ug
# Conflicts: # Document-Processing/PDF/PDF-Library/NET/Working-with-DigitalSignature.md
2 parents 62ba33e + 15834d5 commit c1fed9c

17 files changed

+2766
-1567
lines changed

Document-Processing/PDF/PDF-Library/NET/Working-with-DigitalSignature.md

Lines changed: 690 additions & 430 deletions
Large diffs are not rendered by default.

Document-Processing/PDF/PDF-Library/NET/Working-with-Document-Conversions.md

Lines changed: 248 additions & 122 deletions
Large diffs are not rendered by default.

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

Lines changed: 242 additions & 92 deletions
Large diffs are not rendered by default.

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-Library/NET/Working-with-Headers-and-Footers.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ The below code snippet explains how to draw the page numbers in footer using aut
2222

2323
{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/PDF-Examples/master/Header%20and%20Footer/Adding-an-automatic-field-in-header-and-footer/.NET/Adding-an-automatic-field-in-header-and-footer/Program.cs" %}
2424

25+
using Syncfusion.Drawing;
26+
using Syncfusion.Pdf;
27+
using Syncfusion.Pdf.Graphics;
28+
2529
//Create a new PDF document.
2630
PdfDocument pdfDocument = new PdfDocument();
2731
//Add a page to the PDF document
@@ -52,16 +56,18 @@ compositeField.Draw(footer.Graphics, new PointF(470, 40));
5256
//Add the footer template at the bottom.
5357
pdfDocument.Template.Bottom = footer;
5458

55-
//Save the document into stream.
56-
MemoryStream stream = new MemoryStream();
57-
pdfDocument.Save(stream);
58-
//Closes the document.
59+
//Save and close the document.
60+
pdfDocument.Save("Output.pdf");
5961
pdfDocument.Close(true);
6062

6163
{% endhighlight %}
6264

6365
{% highlight c# tabtitle="C# [Windows-specific]" %}
6466

67+
using System.Drawing;
68+
using Syncfusion.Pdf;
69+
using Syncfusion.Pdf.Graphics;
70+
6571
//Create a new PDF document.
6672
PdfDocument pdfDocument = new PdfDocument();
6773
//Add a page to the PDF document
@@ -98,6 +104,10 @@ pdfDocument.Close(true);
98104

99105
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
100106

107+
Imports Syncfusion.Drawing
108+
Imports Syncfusion.Pdf
109+
Imports Syncfusion.Pdf.Graphics
110+
101111
'Create a new PDF document.
102112
Dim pdfDocument As New PdfDocument()
103113
'Add a page to the PDF document.
@@ -146,6 +156,10 @@ The example below illustrates how to implement a dynamic footer that updates uni
146156

147157
{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/PDF-Examples/master/Header%20and%20Footer/Adding-dynamic-headers-and-footers-in-PDF/.NET/Adding-dynamic-headers-and-footers-in-PDF/Program.cs" %}
148158

159+
using Syncfusion.Drawing;
160+
using Syncfusion.Pdf;
161+
using Syncfusion.Pdf.Graphics;
162+
149163
// Create a new PDF document.
150164
PdfDocument document = new PdfDocument();
151165

@@ -213,10 +227,7 @@ PdfPage firstPage = document.Pages.Add();
213227
textElement.Draw(firstPage, new PointF(0, headerHeight));
214228

215229
// Save and close the document.
216-
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Output.pdf"), FileMode.Create, FileAccess.Write))
217-
{
218-
document.Save(outputFileStream);
219-
}
230+
document.Save("Output.pdf");
220231
document.Close(true);
221232

222233
// Add header and footer to every page.
@@ -249,6 +260,10 @@ static void PageAddedHandler(object sender, PageAddedEventArgs e)
249260

250261
{% highlight c# tabtitle="C# [Windows-specific]" %}
251262

263+
using System.Drawing;
264+
using Syncfusion.Pdf;
265+
using Syncfusion.Pdf.Graphics;
266+
252267
// Create a new PDF document.
253268
PdfDocument document = new PdfDocument();
254269

@@ -349,6 +364,10 @@ static void PageAddedHandler(object sender, PageAddedEventArgs e)
349364

350365
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
351366

367+
Imports Syncfusion.Drawing
368+
Imports Syncfusion.Pdf
369+
Imports Syncfusion.Pdf.Graphics
370+
352371
' Create a new PDF document.
353372
Dim document As New PdfDocument()
354373

0 commit comments

Comments
 (0)