diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_Excel.cs b/Application/FileConverter/ConversionJobs/ConversionJob_Excel.cs index 6c9d57c..c4d4d02 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_Excel.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_Excel.cs @@ -8,7 +8,7 @@ namespace FileConverter.ConversionJobs using FileConverter.Diagnostics; - using Excel = Microsoft.Office.Interop.Excel; + using Excel = NetOffice.ExcelApi; public class ConversionJob_Excel : ConversionJob_Office { @@ -108,7 +108,7 @@ namespace FileConverter.ConversionJobs this.UserState = Properties.Resources.ConversionStateConversion; Debug.Log("Convert excel document to pdf."); - this.document.ExportAsFixedFormat(Excel.XlFixedFormatType.xlTypePDF, this.intermediateFilePath); + this.document.ExportAsFixedFormat(Excel.Enums.XlFixedFormatType.xlTypePDF, this.intermediateFilePath); Debug.Log($"Close excel document '{this.InputFilePath}'."); this.document.Close(false); diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_PowerPoint.cs b/Application/FileConverter/ConversionJobs/ConversionJob_PowerPoint.cs index 110d30b..110c7fc 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_PowerPoint.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_PowerPoint.cs @@ -7,9 +7,8 @@ namespace FileConverter.ConversionJobs using System.Threading.Tasks; using FileConverter.Diagnostics; - using Microsoft.Office.Core; - using PowerPoint = Microsoft.Office.Interop.PowerPoint; + using PowerPoint = NetOffice.PowerPointApi; public class ConversionJob_PowerPoint : ConversionJob_Office { @@ -97,7 +96,7 @@ namespace FileConverter.ConversionJobs this.UserState = Properties.Resources.ConversionStateConversion; Debug.Log("Convert PowerPoint document to pdf."); - this.document.ExportAsFixedFormat(this.intermediateFilePath, PowerPoint.PpFixedFormatType.ppFixedFormatTypePDF); + this.document.ExportAsFixedFormat(this.intermediateFilePath, PowerPoint.Enums.PpFixedFormatType.ppFixedFormatTypePDF); Debug.Log($"Close PowerPoint document '{this.InputFilePath}'."); this.document.Close(); @@ -201,7 +200,7 @@ namespace FileConverter.ConversionJobs { Debug.Log($"Load PowerPoint document '{this.InputFilePath}'."); - this.document = this.application.Presentations.Open(this.InputFilePath, ReadOnly: MsoTriState.msoTrue, WithWindow: MsoTriState.msoFalse); + this.document = this.application.Presentations.Open(this.InputFilePath, readOnly: NetOffice.OfficeApi.Enums.MsoTriState.msoTrue, untitled: NetOffice.OfficeApi.Enums.MsoTriState.msoFalse, withWindow: NetOffice.OfficeApi.Enums.MsoTriState.msoFalse); } return this.document != null; diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_Word.cs b/Application/FileConverter/ConversionJobs/ConversionJob_Word.cs index 18eebc8..cf1360d 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_Word.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_Word.cs @@ -8,7 +8,7 @@ namespace FileConverter.ConversionJobs using FileConverter.Diagnostics; - using Word = Microsoft.Office.Interop.Word; + using Word = NetOffice.WordApi; public class ConversionJob_Word : ConversionJob_Office { @@ -42,7 +42,7 @@ namespace FileConverter.ConversionJobs return 1; } - int pagesCount = this.document.ComputeStatistics(Word.WdStatistic.wdStatisticPages); + int pagesCount = this.document.ComputeStatistics(Word.Enums.WdStatistic.wdStatisticPages); return pagesCount; } @@ -102,19 +102,19 @@ namespace FileConverter.ConversionJobs Debug.Log("Convert word document to pdf."); // this.document.ExportAsFixedFormat(this.intermediateFilePath, Word.WdExportFormat.wdExportFormatPDF); this.document.ExportAsFixedFormat(this.intermediateFilePath, - Word.WdExportFormat.wdExportFormatPDF, + Word.Enums.WdExportFormat.wdExportFormatPDF, false, - Word.WdExportOptimizeFor.wdExportOptimizeForPrint, - Word.WdExportRange.wdExportAllDocument, + Word.Enums.WdExportOptimizeFor.wdExportOptimizeForPrint, + Word.Enums.WdExportRange.wdExportAllDocument, 1, 1, - Word.WdExportItem.wdExportDocumentContent, + Word.Enums.WdExportItem.wdExportDocumentContent, true, true, - Word.WdExportCreateBookmarks.wdExportCreateHeadingBookmarks, + Word.Enums.WdExportCreateBookmarks.wdExportCreateHeadingBookmarks, true); Debug.Log($"Close word document '{this.InputFilePath}'."); - this.document.Close(Word.WdSaveOptions.wdDoNotSaveChanges); + this.document.Close(Word.Enums.WdSaveOptions.wdDoNotSaveChanges); this.document = null; this.ReleaseOfficeApplicationInstanceIfNeeded(); @@ -159,7 +159,7 @@ namespace FileConverter.ConversionJobs // Initialize word application. Debug.Log("Instantiate word application via interop."); - this.application = new Microsoft.Office.Interop.Word.Application + this.application = new Word.Application { Visible = false }; diff --git a/Application/FileConverter/FileConverter.csproj b/Application/FileConverter/FileConverter.csproj index 4203ae6..fd50ac1 100644 --- a/Application/FileConverter/FileConverter.csproj +++ b/Application/FileConverter/FileConverter.csproj @@ -393,25 +393,22 @@ 8.4.0 - 14.4.0 + 14.10.2 - 9.0.2 - - - 15.0.4795.1000 - - - 12.0.4518.1014 - - - 15.0.4797.1003 + 10.0.3 1.1.135 - - 12.0.0 + + 1.7.4.11 + + + 1.7.4.11 + + + 1.7.4.11 2.7.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index e29588c..d10e64a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ - Fixes: Various English grammar corrections and improvements (thanks to One-Hoopy-Frood). - Fixes: Traditional Chinese translation issues (thanks to NeKoOuO). - Fixes: Vietnamese translation issues (thanks to thaovd). +- Tech: Update ffmpeg to v8.0.1 and ImageMagick to v14.10. +- Tech: Remove deprecated dependency (Office). Replace it with NetOffice. ## Version 2.1 diff --git a/Middleware/ffmpeg/ffmpeg.exe b/Middleware/ffmpeg/ffmpeg.exe index 2f7e654..bb2dbeb 100644 Binary files a/Middleware/ffmpeg/ffmpeg.exe and b/Middleware/ffmpeg/ffmpeg.exe differ