Skip to content

Commit 8a2c71a

Browse files
Removed the conversion from Word to PDF
1 parent 20260a9 commit 8a2c71a

File tree

1 file changed

+3
-12
lines changed
  • Tables/Add-rows-with-dynamic-data/Add-rows-with-dynamic-data

1 file changed

+3
-12
lines changed

Tables/Add-rows-with-dynamic-data/Add-rows-with-dynamic-data/Program.cs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
using Syncfusion.DocIO;
22
using Syncfusion.DocIO.DLS;
3-
using Syncfusion.DocIORenderer;
4-
using Syncfusion.Pdf;
53

64
using (FileStream inputStream = new FileStream(@"Data/Template.docx", FileMode.Open, FileAccess.Read))
75
{
@@ -36,17 +34,10 @@
3634
}
3735
}
3836
}
39-
using (DocIORenderer renderer = new DocIORenderer())
37+
using (FileStream outputStream = new FileStream(@"Output/Result.docx", FileMode.Create, FileAccess.Write))
4038
{
41-
// Convert the Word document into a PDF document.
42-
using (PdfDocument pdfDocument = renderer.ConvertToPDF(document))
43-
{
44-
using (FileStream outputStream = new FileStream(@"Output/Result.pdf", FileMode.Create, FileAccess.Write))
45-
{
46-
// Save the converted PDF document.
47-
pdfDocument.Save(outputStream);
48-
}
49-
}
39+
// Save the converted PDF document.
40+
document.Save(outputStream, FormatType.Docx);
5041
}
5142
}
5243
}

0 commit comments

Comments
 (0)