diff --git a/MCS.FOI.S3FileConversion/MCS.FOI.CalendarToPDF/MCS.FOI.CalendarToPDF.csproj b/MCS.FOI.S3FileConversion/MCS.FOI.CalendarToPDF/MCS.FOI.CalendarToPDF.csproj
index 339216474..c10eb90d1 100644
--- a/MCS.FOI.S3FileConversion/MCS.FOI.CalendarToPDF/MCS.FOI.CalendarToPDF.csproj
+++ b/MCS.FOI.S3FileConversion/MCS.FOI.CalendarToPDF/MCS.FOI.CalendarToPDF.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/MCS.FOI.S3FileConversion/MCS.FOI.DocToPDF/DocFileProcessor.cs b/MCS.FOI.S3FileConversion/MCS.FOI.DocToPDF/DocFileProcessor.cs
index 748f8f9db..6bb8eba48 100644
--- a/MCS.FOI.S3FileConversion/MCS.FOI.DocToPDF/DocFileProcessor.cs
+++ b/MCS.FOI.S3FileConversion/MCS.FOI.DocToPDF/DocFileProcessor.cs
@@ -43,42 +43,22 @@ public DocFileProcessor(Stream SourceStream)
{
using (WordDocument wordDocument = new WordDocument(SourceStream, Syncfusion.DocIO.FormatType.Automatic))
{
+
wordDocument.RevisionOptions.CommentDisplayMode = CommentDisplayMode.ShowInBalloons;
wordDocument.RevisionOptions.CommentColor = RevisionColor.Blue;
- foreach(var entity in wordDocument.ChildEntities)
+
+ using (DocIORenderer renderer = new DocIORenderer())
{
- if(entity.GetType().FullName == "Syncfusion.DocIO.DLS.WSection")
- {
- Syncfusion.DocIO.DLS.WSection _wsection = (Syncfusion.DocIO.DLS.WSection)entity;
-
- foreach (IWTable table in _wsection.Tables)
- {
- table.TableFormat.IsAutoResized = false;
- table.TableFormat.WrapTextAround = true;
- }
-
- }
+ using PdfDocument pdfDocument = renderer.ConvertToPDF(wordDocument);
+ //Save the PDF file
+ //Close the instance of document objects
+ pdfDocument.Save(output);
+ pdfDocument.Close(true);
+ converted = true;
}
- using (Stream wordstream = new MemoryStream())
- {
- wordDocument.Save(wordstream, wordDocument.ActualFormatType);
-
- //Creates an instance of DocIORenderer.
- using (DocIORenderer renderer = new DocIORenderer())
- {
-
- using PdfDocument pdfDocument = renderer.ConvertToPDF(wordstream);
- //Save the PDF file
- //Close the instance of document objects
- pdfDocument.Save(output);
- pdfDocument.Close(true);
- converted = true;
-
- }
- }
}
}
catch (Exception e)
diff --git a/MCS.FOI.S3FileConversion/MCS.FOI.DocToPDF/MCS.FOI.DocToPDF.csproj b/MCS.FOI.S3FileConversion/MCS.FOI.DocToPDF/MCS.FOI.DocToPDF.csproj
index 25e0301a2..2c4b45afd 100644
--- a/MCS.FOI.S3FileConversion/MCS.FOI.DocToPDF/MCS.FOI.DocToPDF.csproj
+++ b/MCS.FOI.S3FileConversion/MCS.FOI.DocToPDF/MCS.FOI.DocToPDF.csproj
@@ -7,7 +7,7 @@
-
+
@@ -15,8 +15,8 @@
-
-
+
+
diff --git a/MCS.FOI.S3FileConversion/MCS.FOI.ExcelToPDF/MCS.FOI.ExcelToPDF.csproj b/MCS.FOI.S3FileConversion/MCS.FOI.ExcelToPDF/MCS.FOI.ExcelToPDF.csproj
index 3caac2185..51173238b 100644
--- a/MCS.FOI.S3FileConversion/MCS.FOI.ExcelToPDF/MCS.FOI.ExcelToPDF.csproj
+++ b/MCS.FOI.S3FileConversion/MCS.FOI.ExcelToPDF/MCS.FOI.ExcelToPDF.csproj
@@ -6,9 +6,9 @@
enable
-
-
-
+
+
+
diff --git a/MCS.FOI.S3FileConversion/MCS.FOI.MSGToPDF/MCS.FOI.MSGToPDF.csproj b/MCS.FOI.S3FileConversion/MCS.FOI.MSGToPDF/MCS.FOI.MSGToPDF.csproj
index f1479f1ec..92be8d41c 100644
--- a/MCS.FOI.S3FileConversion/MCS.FOI.MSGToPDF/MCS.FOI.MSGToPDF.csproj
+++ b/MCS.FOI.S3FileConversion/MCS.FOI.MSGToPDF/MCS.FOI.MSGToPDF.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/MCS.FOI.S3FileConversion/MCS.FOI.PptToPDF/MCS.FOI.PPTToPDF.csproj b/MCS.FOI.S3FileConversion/MCS.FOI.PptToPDF/MCS.FOI.PPTToPDF.csproj
index 8092e8b24..234c8f398 100644
--- a/MCS.FOI.S3FileConversion/MCS.FOI.PptToPDF/MCS.FOI.PPTToPDF.csproj
+++ b/MCS.FOI.S3FileConversion/MCS.FOI.PptToPDF/MCS.FOI.PPTToPDF.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/MCS.FOI.S3FileConversion/MCS.FOI.S3FileConversion/MCS.FOI.S3FileConversion.csproj b/MCS.FOI.S3FileConversion/MCS.FOI.S3FileConversion/MCS.FOI.S3FileConversion.csproj
index 05e23eb45..3b897ce04 100644
--- a/MCS.FOI.S3FileConversion/MCS.FOI.S3FileConversion/MCS.FOI.S3FileConversion.csproj
+++ b/MCS.FOI.S3FileConversion/MCS.FOI.S3FileConversion/MCS.FOI.S3FileConversion.csproj
@@ -33,14 +33,14 @@
-
-
+
+
-
+