Skip to content

Commit d3d6168

Browse files
Modified the NET to NET.Core
1 parent 5a13de9 commit d3d6168

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Word-to-PDF-Conversion/Replace-embedded-excel-as-image/.NET/Replace-embedded-excel-as-image/Program.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
using Syncfusion.XlsIO;
66
using Syncfusion.XlsIORenderer;
77

8-
//Initialize the DocIORenderer component for converting Word documents to PDF.
9-
using (DocIORenderer docIORenderer = new DocIORenderer())
8+
9+
using (FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Input.docx"), FileMode.Open, FileAccess.Read))
1010
{
11-
using (FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Input.docx"), FileMode.Open, FileAccess.Read))
11+
//Open the input Word document.
12+
using (WordDocument document = new WordDocument(inputStream, FormatType.Automatic))
1213
{
13-
//Open the input Word document.
14-
using (WordDocument document = new WordDocument(inputStream, FormatType.Automatic))
15-
{
16-
//Replace embedded Excel objects in the document with images.
17-
ReplaceExcelToImage(document);
18-
//Convert the Word document to a PDF using the DocIORenderer component.
14+
//Replace embedded Excel objects in the document with images.
15+
ReplaceExcelToImage(document);
16+
//Initialize the DocIORenderer component for converting Word documents to PDF.
17+
using (DocIORenderer docIORenderer = new DocIORenderer())
18+
{ //Convert the Word document to a PDF using the DocIORenderer component.
1919
using (PdfDocument pdf = docIORenderer.ConvertToPDF(document))
2020
{
2121
using (FileStream outputStream = new FileStream(Path.GetFullPath(@"Output/Output.pdf"), FileMode.Create, FileAccess.Write))

Word-to-PDF-Conversion/Replace-embedded-excel-as-image/.NET/Replace-embedded-excel-as-image/Replace-embedded-excel-as-image.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Syncfusion.DocIORenderer.NET" Version="*" />
13-
<PackageReference Include="Syncfusion.XlsIORenderer.NET" Version="*" />
12+
<PackageReference Include="Syncfusion.DocIORenderer.NET.Core" Version="*" />
13+
<PackageReference Include="Syncfusion.XlsIORenderer.NET.Core" Version="*" />
1414
<PackageReference Include="System.Drawing.Common" Version="8.0.2" />
1515
</ItemGroup>
1616

0 commit comments

Comments
 (0)