From 4f7e5d9e94874d28a69aa97823027acb9104df7d Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Tue, 4 Feb 2025 15:47:13 +0530 Subject: [PATCH 1/6] 938086: Added export code in MVC --- .../export-pdf-client/document-editor.cs | 5 ++ .../export-pdf-server/document-editor.cs | 5 ++ .../document-editor/export-pdf/aspnet-core.cs | 21 +++++++ .../document-editor/export-pdf/aspnet-mvc.cs | 24 ++++++++ .../how-to/export-document-as-pdf.md | 60 +++++++++++-------- 5 files changed, 89 insertions(+), 26 deletions(-) create mode 100644 ej2-asp-core-mvc/code-snippet/document-editor-container/export-pdf-client/document-editor.cs create mode 100644 ej2-asp-core-mvc/code-snippet/document-editor-container/export-pdf-server/document-editor.cs create mode 100644 ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-core.cs create mode 100644 ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-mvc.cs diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/export-pdf-client/document-editor.cs b/ej2-asp-core-mvc/code-snippet/document-editor-container/export-pdf-client/document-editor.cs new file mode 100644 index 0000000000..048a3eb88c --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/export-pdf-client/document-editor.cs @@ -0,0 +1,5 @@ +public ActionResult Default() +{ + return View(); +} + diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/export-pdf-server/document-editor.cs b/ej2-asp-core-mvc/code-snippet/document-editor-container/export-pdf-server/document-editor.cs new file mode 100644 index 0000000000..048a3eb88c --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/export-pdf-server/document-editor.cs @@ -0,0 +1,5 @@ +public ActionResult Default() +{ + return View(); +} + diff --git a/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-core.cs b/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-core.cs new file mode 100644 index 0000000000..dcc07ed617 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-core.cs @@ -0,0 +1,21 @@ +[AcceptVerbs("Post")] +[HttpPost] +[EnableCors("AllowAllOrigins")] +[Route("ExportPdf")] +public void ExportPdf([FromBody]SaveParameter data) +{ + // Converts the sfdt to stream + Stream document = WordDocument.Save(data.content, FormatType.Docx); + Syncfusion.DocIO.DLS.WordDocument doc = new Syncfusion.DocIO.DLS.WordDocument(document, Syncfusion.DocIO.FormatType.Docx); + //Instantiation of DocIORenderer for Word to PDF conversion + DocIORenderer render = new DocIORenderer(); + //Converts Word document into PDF document + PdfDocument pdfDocument = render.ConvertToPDF(doc); + // Saves the document to server machine file system, you can customize here to save into databases or file servers based on requirement. + FileStream fileStream = new FileStream("sample.pdf", FileMode.OpenOrCreate, FileAccess.ReadWrite); + //Saves the PDF file + pdfDocument.Save(fileStream); + pdfDocument.Close(); + fileStream.Close(); + document.Close(); +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-mvc.cs b/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-mvc.cs new file mode 100644 index 0000000000..6440f14030 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-mvc.cs @@ -0,0 +1,24 @@ +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +using Syncfusion.Pdf; +using Syncfusion.DocToPDFConverter; + +[HttpPost] +public void ExportPdf([FromBody] SaveParameter data) +{ + // Converts the sfdt to stream + Stream document = WordDocument.Save(data.Content, Syncfusion.EJ2.DocumentEditor.FormatType.Docx); + Syncfusion.DocIO.DLS.WordDocument doc = new Syncfusion.DocIO.DLS.WordDocument(document, Syncfusion.DocIO.FormatType.Docx); + //Instantiation of DocIORenderer for Word to PDF conversion + DocToPDFConverter render = new DocToPDFConverter(); + //Converts Word document into PDF document + PdfDocument pdfDocument = render.ConvertToPDF(doc); + string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data", "sample.pdf"); + // Saves the document to server machine file system, you can customize here to save into databases or file servers based on requirement. + FileStream fileStream = new FileStream(filePath, FileMode.OpenOrCreate, FileAccess.ReadWrite); + //Saves the PDF file + pdfDocument.Save(fileStream); + pdfDocument.Close(); + fileStream.Close(); + document.Close(); +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md b/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md index 4e964d3550..4a0c0ebc2f 100644 --- a/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md +++ b/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md @@ -1,6 +1,6 @@ --- layout: post -title: Export Document As PDF in ##Platform_Name## Document Editor Component +title: Export PDF Document in ##Platform_Name## Document Editor Component |Syncfusion description: Learn here all about export document as PDF in Syncfusion ##Platform_Name## Document Editor component of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Export Document As PDF @@ -26,6 +26,7 @@ N> You can install the PDF export packages from this [`link`](https://www.npmjs. {% include code-snippet/document-editor-container/export-pdf-client/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Export-pdf-client.cs" %} +{% include code-snippet/document-editor-container/export-pdf-client/document-editor.cs %} {% endhighlight %}{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -35,6 +36,7 @@ N> You can install the PDF export packages from this [`link`](https://www.npmjs. {% include code-snippet/document-editor-container/export-pdf-client/razor %} {% endhighlight %} {% highlight c# tabtitle="Export-pdf-client.cs" %} +{% include code-snippet/document-editor-container/export-pdf-client/document-editor.cs %} {% endhighlight %}{% endtabs %} {% endif %} @@ -42,7 +44,7 @@ N> You can install the PDF export packages from this [`link`](https://www.npmjs. ## Export document as PDF in server-side using Syncfusion® DocIO -With the help of [`Synfusion DocIO`](https://help.syncfusion.com/file-formats/docio/word-to-pdf), you can export the document as PDF in server-side. Here, you can search the text. +With the help of [`Syncfusion DocIO`](https://help.syncfusion.com/file-formats/docio/word-to-pdf), you can export the document as PDF in server-side. Here, you can search the text. The following way illustrates how to convert the document as PDF: @@ -55,6 +57,7 @@ The following way illustrates how to convert the document as PDF: {% include code-snippet/document-editor-container/export-pdf-server/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Export-pdf-server.cs" %} +{% include code-snippet/document-editor-container/export-pdf-server/document-editor.cs %} {% endhighlight %}{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -64,36 +67,41 @@ The following way illustrates how to convert the document as PDF: {% include code-snippet/document-editor-container/export-pdf-server/razor %} {% endhighlight %} {% highlight c# tabtitle="Export-pdf-server.cs" %} +{% include code-snippet/document-editor-container/export-pdf-server/document-editor.cs %} {% endhighlight %}{% endtabs %} {% endif %} - +{% if page.publishingplatform == "aspnet-core" %} * Using Save API in server-side, you can convert the sfdt to stream. * Finally, convert the stream to PDF using `Syncfusion.DocIORenderer.Net.Core` library. -```csharp -[AcceptVerbs("Post")] -[HttpPost] -[EnableCors("AllowAllOrigins")] -[Route("ExportPdf")] -public void ExportPdf([FromBody]SaveParameter data) -{ - // Converts the sfdt to stream - Stream document = WordDocument.Save(data.content, FormatType.Docx); - Syncfusion.DocIO.DLS.WordDocument doc = new Syncfusion.DocIO.DLS.WordDocument(document, Syncfusion.DocIO.FormatType.Docx); - //Instantiation of DocIORenderer for Word to PDF conversion - DocIORenderer render = new DocIORenderer(); - //Converts Word document into PDF document - PdfDocument pdfDocument = render.ConvertToPDF(doc); - // Saves the document to server machine file system, you can customize here to save into databases or file servers based on requirement. - FileStream fileStream = new FileStream("sample.pdf", FileMode.OpenOrCreate, FileAccess.ReadWrite); - //Saves the PDF file - pdfDocument.Save(fileStream); - pdfDocument.Close(); - fileStream.Close(); - document.Close(); -} -``` +{% elsif page.publishingplatform == "aspnet-mvc" %} + +* Using Save API in server-side, you can convert the sfdt to stream. +* Finally, convert the stream to PDF using `Syncfusion.DocToPdfConverter.AspNet.Mvc5` library. + +{% endif %} + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% endhighlight %} +{% highlight c# tabtitle="DocumentEditorController.cs" %} +{% include code-snippet/document-editor/export-pdf/aspnet-core.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% endhighlight %} +{% highlight c# tabtitle="DocumentEditorController.cs" %} +{% include code-snippet/document-editor/export-pdf/aspnet-mvc.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} Get the complete working sample in this [`link`](https://github.com/SyncfusionExamples/Export-document-as-PDF-in-Document-Editor/). \ No newline at end of file From 8f4dc04ec08b7d49e95fe9c7954d6ced287ca728 Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Tue, 4 Feb 2025 16:02:18 +0530 Subject: [PATCH 2/6] 938086: Resolved tag issue --- .../document-editor/how-to/export-document-as-pdf.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md b/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md index 4a0c0ebc2f..c9ce02fee9 100644 --- a/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md +++ b/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md @@ -90,6 +90,7 @@ The following way illustrates how to convert the document as PDF: {% endhighlight %} {% highlight c# tabtitle="DocumentEditorController.cs" %} {% include code-snippet/document-editor/export-pdf/aspnet-core.cs %} +{% include code-snippet/document-editor/export-pdf/document-editor.cs %} {% endhighlight %} {% endtabs %} @@ -100,6 +101,7 @@ The following way illustrates how to convert the document as PDF: {% endhighlight %} {% highlight c# tabtitle="DocumentEditorController.cs" %} {% include code-snippet/document-editor/export-pdf/aspnet-mvc.cs %} +{% include code-snippet/document-editor/export-pdf/document-editor.cs %} {% endhighlight %} {% endtabs %} {% endif %} From 3fd429a628858ea59df658fae95b766d9996c821 Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Tue, 4 Feb 2025 16:03:08 +0530 Subject: [PATCH 3/6] 938086: Resolved tag issue --- .../document-editor/export-pdf/document-editor.cs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/document-editor.cs diff --git a/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/document-editor.cs b/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/document-editor.cs new file mode 100644 index 0000000000..048a3eb88c --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/document-editor.cs @@ -0,0 +1,5 @@ +public ActionResult Default() +{ + return View(); +} + From 1dd1bc2a2c6c8b0f7b75c5b873109a13d5a9995f Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Tue, 4 Feb 2025 16:21:11 +0530 Subject: [PATCH 4/6] 938086: Resolved Tag issue --- .../document-editor/export-pdf/document-editor.cs | 5 ----- .../document-editor/how-to/export-document-as-pdf.md | 2 -- 2 files changed, 7 deletions(-) delete mode 100644 ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/document-editor.cs diff --git a/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/document-editor.cs b/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/document-editor.cs deleted file mode 100644 index 048a3eb88c..0000000000 --- a/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/document-editor.cs +++ /dev/null @@ -1,5 +0,0 @@ -public ActionResult Default() -{ - return View(); -} - diff --git a/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md b/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md index c9ce02fee9..4a0c0ebc2f 100644 --- a/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md +++ b/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md @@ -90,7 +90,6 @@ The following way illustrates how to convert the document as PDF: {% endhighlight %} {% highlight c# tabtitle="DocumentEditorController.cs" %} {% include code-snippet/document-editor/export-pdf/aspnet-core.cs %} -{% include code-snippet/document-editor/export-pdf/document-editor.cs %} {% endhighlight %} {% endtabs %} @@ -101,7 +100,6 @@ The following way illustrates how to convert the document as PDF: {% endhighlight %} {% highlight c# tabtitle="DocumentEditorController.cs" %} {% include code-snippet/document-editor/export-pdf/aspnet-mvc.cs %} -{% include code-snippet/document-editor/export-pdf/document-editor.cs %} {% endhighlight %} {% endtabs %} {% endif %} From 0f0186465773e05180c287b06f2e630c42ee32b4 Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Tue, 4 Feb 2025 16:40:51 +0530 Subject: [PATCH 5/6] 938086: Resolved tag issue with establishing code --- .../document-editor/export-pdf/aspnet-core.cs | 21 ------ .../document-editor/export-pdf/aspnet-mvc.cs | 24 ------ .../how-to/export-document-as-pdf.md | 74 +++++++++++++------ 3 files changed, 53 insertions(+), 66 deletions(-) delete mode 100644 ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-core.cs delete mode 100644 ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-mvc.cs diff --git a/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-core.cs b/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-core.cs deleted file mode 100644 index dcc07ed617..0000000000 --- a/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-core.cs +++ /dev/null @@ -1,21 +0,0 @@ -[AcceptVerbs("Post")] -[HttpPost] -[EnableCors("AllowAllOrigins")] -[Route("ExportPdf")] -public void ExportPdf([FromBody]SaveParameter data) -{ - // Converts the sfdt to stream - Stream document = WordDocument.Save(data.content, FormatType.Docx); - Syncfusion.DocIO.DLS.WordDocument doc = new Syncfusion.DocIO.DLS.WordDocument(document, Syncfusion.DocIO.FormatType.Docx); - //Instantiation of DocIORenderer for Word to PDF conversion - DocIORenderer render = new DocIORenderer(); - //Converts Word document into PDF document - PdfDocument pdfDocument = render.ConvertToPDF(doc); - // Saves the document to server machine file system, you can customize here to save into databases or file servers based on requirement. - FileStream fileStream = new FileStream("sample.pdf", FileMode.OpenOrCreate, FileAccess.ReadWrite); - //Saves the PDF file - pdfDocument.Save(fileStream); - pdfDocument.Close(); - fileStream.Close(); - document.Close(); -} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-mvc.cs b/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-mvc.cs deleted file mode 100644 index 6440f14030..0000000000 --- a/ej2-asp-core-mvc/code-snippet/document-editor/export-pdf/aspnet-mvc.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Syncfusion.DocIO; -using Syncfusion.DocIO.DLS; -using Syncfusion.Pdf; -using Syncfusion.DocToPDFConverter; - -[HttpPost] -public void ExportPdf([FromBody] SaveParameter data) -{ - // Converts the sfdt to stream - Stream document = WordDocument.Save(data.Content, Syncfusion.EJ2.DocumentEditor.FormatType.Docx); - Syncfusion.DocIO.DLS.WordDocument doc = new Syncfusion.DocIO.DLS.WordDocument(document, Syncfusion.DocIO.FormatType.Docx); - //Instantiation of DocIORenderer for Word to PDF conversion - DocToPDFConverter render = new DocToPDFConverter(); - //Converts Word document into PDF document - PdfDocument pdfDocument = render.ConvertToPDF(doc); - string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data", "sample.pdf"); - // Saves the document to server machine file system, you can customize here to save into databases or file servers based on requirement. - FileStream fileStream = new FileStream(filePath, FileMode.OpenOrCreate, FileAccess.ReadWrite); - //Saves the PDF file - pdfDocument.Save(fileStream); - pdfDocument.Close(); - fileStream.Close(); - document.Close(); -} \ No newline at end of file diff --git a/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md b/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md index 4a0c0ebc2f..6fd4000667 100644 --- a/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md +++ b/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md @@ -76,32 +76,64 @@ The following way illustrates how to convert the document as PDF: * Using Save API in server-side, you can convert the sfdt to stream. * Finally, convert the stream to PDF using `Syncfusion.DocIORenderer.Net.Core` library. +```csharp +[AcceptVerbs("Post")] +[HttpPost] +[EnableCors("AllowAllOrigins")] +[Route("ExportPdf")] +public void ExportPdf([FromBody]SaveParameter data) +{ + // Converts the sfdt to stream + Stream document = WordDocument.Save(data.content, FormatType.Docx); + Syncfusion.DocIO.DLS.WordDocument doc = new Syncfusion.DocIO.DLS.WordDocument(document, Syncfusion.DocIO.FormatType.Docx); + //Instantiation of DocIORenderer for Word to PDF conversion + DocIORenderer render = new DocIORenderer(); + //Converts Word document into PDF document + PdfDocument pdfDocument = render.ConvertToPDF(doc); + // Saves the document to server machine file system, you can customize here to save into databases or file servers based on requirement. + FileStream fileStream = new FileStream("sample.pdf", FileMode.OpenOrCreate, FileAccess.ReadWrite); + //Saves the PDF file + pdfDocument.Save(fileStream); + pdfDocument.Close(); + fileStream.Close(); + document.Close(); +} + +``` + {% elsif page.publishingplatform == "aspnet-mvc" %} * Using Save API in server-side, you can convert the sfdt to stream. * Finally, convert the stream to PDF using `Syncfusion.DocToPdfConverter.AspNet.Mvc5` library. -{% endif %} - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% endhighlight %} -{% highlight c# tabtitle="DocumentEditorController.cs" %} -{% include code-snippet/document-editor/export-pdf/aspnet-core.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% endhighlight %} -{% highlight c# tabtitle="DocumentEditorController.cs" %} -{% include code-snippet/document-editor/export-pdf/aspnet-mvc.cs %} -{% endhighlight %} -{% endtabs %} +```csharp + +using Syncfusion.DocIO; +using Syncfusion.DocIO.DLS; +using Syncfusion.Pdf; +using Syncfusion.DocToPDFConverter; + +[HttpPost] +public void ExportPdf([FromBody] SaveParameter data) +{ + // Converts the sfdt to stream + Stream document = WordDocument.Save(data.Content, Syncfusion.EJ2.DocumentEditor.FormatType.Docx); + Syncfusion.DocIO.DLS.WordDocument doc = new Syncfusion.DocIO.DLS.WordDocument(document, Syncfusion.DocIO.FormatType.Docx); + //Instantiation of DocIORenderer for Word to PDF conversion + DocToPDFConverter render = new DocToPDFConverter(); + //Converts Word document into PDF document + PdfDocument pdfDocument = render.ConvertToPDF(doc); + string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data", "sample.pdf"); + // Saves the document to server machine file system, you can customize here to save into databases or file servers based on requirement. + FileStream fileStream = new FileStream(filePath, FileMode.OpenOrCreate, FileAccess.ReadWrite); + //Saves the PDF file + pdfDocument.Save(fileStream); + pdfDocument.Close(); + fileStream.Close(); + document.Close(); +} + +``` {% endif %} Get the complete working sample in this [`link`](https://github.com/SyncfusionExamples/Export-document-as-PDF-in-Document-Editor/). \ No newline at end of file From d95787eae732bbbcecf49e2aeb28097aa0cd7a9c Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Tue, 4 Feb 2025 16:50:41 +0530 Subject: [PATCH 6/6] 938086: Resolved tag issue --- .../document-editor/how-to/export-document-as-pdf.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md b/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md index 6fd4000667..0d18e560c9 100644 --- a/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md +++ b/ej2-asp-core-mvc/document-editor/how-to/export-document-as-pdf.md @@ -27,7 +27,8 @@ N> You can install the PDF export packages from this [`link`](https://www.npmjs. {% endhighlight %} {% highlight c# tabtitle="Export-pdf-client.cs" %} {% include code-snippet/document-editor-container/export-pdf-client/document-editor.cs %} -{% endhighlight %}{% endtabs %} +{% endhighlight %} +{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -37,7 +38,8 @@ N> You can install the PDF export packages from this [`link`](https://www.npmjs. {% endhighlight %} {% highlight c# tabtitle="Export-pdf-client.cs" %} {% include code-snippet/document-editor-container/export-pdf-client/document-editor.cs %} -{% endhighlight %}{% endtabs %} +{% endhighlight %} +{% endtabs %} {% endif %} @@ -58,7 +60,8 @@ The following way illustrates how to convert the document as PDF: {% endhighlight %} {% highlight c# tabtitle="Export-pdf-server.cs" %} {% include code-snippet/document-editor-container/export-pdf-server/document-editor.cs %} -{% endhighlight %}{% endtabs %} +{% endhighlight %} +{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -68,7 +71,8 @@ The following way illustrates how to convert the document as PDF: {% endhighlight %} {% highlight c# tabtitle="Export-pdf-server.cs" %} {% include code-snippet/document-editor-container/export-pdf-server/document-editor.cs %} -{% endhighlight %}{% endtabs %} +{% endhighlight %} +{% endtabs %} {% endif %} {% if page.publishingplatform == "aspnet-core" %}