From 03bc6bcfa733e98b78ecee7cd4d8480483715e18 Mon Sep 17 00:00:00 2001 From: mohammedaffanc Date: Tue, 20 Aug 2024 16:30:49 +0530 Subject: [PATCH 1/5] 903621: Upgraded the .net version to .net 8.0 --- Dockerfile | 4 +- README.md | 2 +- .../Controllers/DocumentEditorController.cs | 278 +++++++++++++++++- .../ej2-documenteditor-server.csproj | 14 +- 4 files changed, 287 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index bd9f44a..3974a8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app EXPOSE 80 ENV SYNCFUSION_LICENSE_KEY="" ENV SPELLCHECK_DICTIONARY_PATH="" ENV SPELLCHECK_JSON_FILENAME="" ENV SPELLCHECK_CACHE_COUNT="" -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /source COPY ["src/ej2-documenteditor-server/ej2-documenteditor-server.csproj", "./ej2-documenteditor-server/ej2-documenteditor-server.csproj"] diff --git a/README.md b/README.md index bb562d4..c8ea7f1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The [Syncfusion **Word Processor (also known as Document Editor)**](https://www.syncfusion.com/javascript-ui-controls/js-word-processor?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker) is a component with editing capabilities like Microsoft Word. It is used to create, edit, view, and print Word documents. It provides all the common word processing abilities, including editing text; formatting contents; resizing images and tables; finding and replacing text; importing, exporting, and printing Word documents; and using bookmarks and tables of contents. -This Docker project is the predefined Docker container for Syncfusion’s Word Processor backend functionalities. This server-side Web API project is targeting ASP.NET Core 6.0. +This Docker project is the predefined Docker container for Syncfusion’s Word Processor backend functionalities. This server-side Web API project is targeting ASP.NET 8.0. If you want to add new functionality or customize any existing functionalities, then create your own Docker file by referencing this Docker project. diff --git a/src/ej2-documenteditor-server/Controllers/DocumentEditorController.cs b/src/ej2-documenteditor-server/Controllers/DocumentEditorController.cs index bde5dfc..c4b7dd8 100644 --- a/src/ej2-documenteditor-server/Controllers/DocumentEditorController.cs +++ b/src/ej2-documenteditor-server/Controllers/DocumentEditorController.cs @@ -1,16 +1,22 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using System.Net.Http; +using System.Text; using System.IO; using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Syncfusion.EJ2.DocumentEditor; +using Syncfusion.DocIORenderer; +using Syncfusion.Pdf; using WDocument = Syncfusion.DocIO.DLS.WordDocument; using WFormatType = Syncfusion.DocIO.FormatType; using Syncfusion.EJ2.SpellChecker; +using SkiaSharp; +using BitMiracle.LibTiff.Classic; namespace EJ2DocumentEditorServer.Controllers { @@ -46,7 +52,6 @@ public string Import(IFormCollection data) WordDocument document = WordDocument.Load(stream, GetFormatType(type.ToLower())); //Unhooks MetafileImageParsed event. WordDocument.MetafileImageParsed -= OnMetafileImageParsed; - string json = Newtonsoft.Json.JsonConvert.SerializeObject(document); document.Dispose(); return json; @@ -55,10 +60,82 @@ public string Import(IFormCollection data) //Converts Metafile to raster image. private static void OnMetafileImageParsed(object sender, MetafileImageParsedEventArgs args) { - //You can write your own method definition for converting metafile to raster image using any third-party image converter. - args.ImageStream = ConvertMetafileToRasterImage(args.MetafileStream); + if (args.IsMetafile) + { + //MetaFile image conversion(EMF and WMF) + //You can write your own method definition for converting metafile to raster image using any third-party image converter. + args.ImageStream = ConvertMetafileToRasterImage(args.MetafileStream); + } + else + { + //TIFF image conversion + args.ImageStream = TiffToPNG(args.MetafileStream); + + } + } + + // Converting Tiff to Png image using Bitmiracle https://www.nuget.org/packages/BitMiracle.LibTiff.NET + private static MemoryStream TiffToPNG(Stream tiffStream) + { + MemoryStream imageStream = new MemoryStream(); + using (Tiff tif = Tiff.ClientOpen("in-memory", "r", tiffStream, new TiffStream())) + { + // Find the width and height of the image + FieldValue[] value = tif.GetField(BitMiracle.LibTiff.Classic.TiffTag.IMAGEWIDTH); + int width = value[0].ToInt(); + + value = tif.GetField(BitMiracle.LibTiff.Classic.TiffTag.IMAGELENGTH); + int height = value[0].ToInt(); + + // Read the image into the memory buffer + int[] raster = new int[height * width]; + if (!tif.ReadRGBAImage(width, height, raster)) + { + throw new Exception("Could not read image"); + } + + // Create a bitmap image using SkiaSharp. + using (SKBitmap sKBitmap = new SKBitmap(width, height, SKImageInfo.PlatformColorType, SKAlphaType.Premul)) + { + // Convert a RGBA value to byte array. + byte[] bitmapData = new byte[sKBitmap.RowBytes * sKBitmap.Height]; + for (int y = 0; y < sKBitmap.Height; y++) + { + int rasterOffset = y * sKBitmap.Width; + int bitsOffset = (sKBitmap.Height - y - 1) * sKBitmap.RowBytes; + + for (int x = 0; x < sKBitmap.Width; x++) + { + int rgba = raster[rasterOffset++]; + bitmapData[bitsOffset++] = (byte)((rgba >> 16) & 0xff); + bitmapData[bitsOffset++] = (byte)((rgba >> 8) & 0xff); + bitmapData[bitsOffset++] = (byte)(rgba & 0xff); + bitmapData[bitsOffset++] = (byte)((rgba >> 24) & 0xff); + } + } + + // Convert a byte array to SKColor array. + SKColor[] sKColor = new SKColor[bitmapData.Length / 4]; + int index = 0; + for (int i = 0; i < bitmapData.Length; i++) + { + sKColor[index] = new SKColor(bitmapData[i + 2], bitmapData[i + 1], bitmapData[i], bitmapData[i + 3]); + i += 3; + index += 1; + } + + // Set the SKColor array to SKBitmap. + sKBitmap.Pixels = sKColor; + + // Save the SKBitmap to PNG image stream. + sKBitmap.Encode(SKEncodedImageFormat.Png, 100).SaveTo(imageStream); + imageStream.Flush(); + } + } + return imageStream; } + private static Stream ConvertMetafileToRasterImage(Stream ImageStream) { //Here we are loading a default raster image as fallback. @@ -296,6 +373,10 @@ internal static WFormatType GetWFormatType(string format) return WFormatType.WordML; case ".odt": return WFormatType.Odt; + case ".html": + return WFormatType.Html; + case ".md": + return WFormatType.Markdown; default: throw new NotSupportedException("EJ2 DocumentEditor does not support this file format."); } @@ -336,15 +417,116 @@ public FileStreamResult Export(IFormCollection data) case WFormatType.WordML: contentType = "application/xml"; break; + case WFormatType.Html: + contentType = "application/html"; + break; + case WFormatType.Markdown: + contentType = "application/markdown"; + break; + case WFormatType.Dotx: + contentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.template"; + break; + case WFormatType.Docx: + contentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; + break; + case WFormatType.Doc: + contentType = "application/msword"; + break; + case WFormatType.Dot: + contentType = "application/msword"; + break; + } + document.Save(stream, type); + } + document.Close(); + stream.Position = 0; + return new FileStreamResult(stream, contentType) + { + FileDownloadName = fileName + }; + } + private string RetrieveFileType(string name) + { + int index = name.LastIndexOf('.'); + string format = index > -1 && index < name.Length - 1 ? + name.Substring(index) : ".doc"; + return format; + } + public class SaveParameter + { + public string Content { get; set; } + public string FileName { get; set; } + public string Format { get; set; } + } + [AcceptVerbs("Post")] + [HttpPost] + [EnableCors("AllowAllOrigins")] + [Route("ServerSideExport")] + public FileStreamResult ServerSideExport([FromBody] SaveParameter data) + { + string fileName = data.FileName; + string format = RetrieveFileType(string.IsNullOrEmpty(data.Format) ? fileName : data.Format); + if (string.IsNullOrEmpty(fileName)) + { + fileName = "Document1.docx"; + } + WDocument document; + if (format.ToLower() == ".pdf") + { + Stream stream = WordDocument.Save(data.Content, FormatType.Docx); + document = new Syncfusion.DocIO.DLS.WordDocument(stream, Syncfusion.DocIO.FormatType.Docx); + } + else + { + document = WordDocument.Save(data.Content); + } + return SaveDocument(document, format, fileName); + } + private FileStreamResult SaveDocument(WDocument document, string format, string fileName) + { + Stream stream = new MemoryStream(); + string contentType = ""; + if (format.ToLower() == ".pdf") + { + contentType = "application/pdf"; + DocIORenderer render = new DocIORenderer(); + PdfDocument pdfDocument = render.ConvertToPDF(document); + stream = new MemoryStream(); + pdfDocument.Save(stream); + pdfDocument.Close(); + } + else + { + WFormatType type = GetWFormatType(format); + switch (type) + { + case WFormatType.Rtf: + contentType = "application/rtf"; + break; + case WFormatType.WordML: + contentType = "application/xml"; + break; + case WFormatType.Html: + contentType = "application/html"; + break; case WFormatType.Dotx: contentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.template"; break; + case WFormatType.Docx: + contentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; + break; case WFormatType.Doc: contentType = "application/msword"; break; case WFormatType.Dot: contentType = "application/msword"; break; + case WFormatType.Odt: + contentType = "application/vnd.oasis.opendocument.text"; + break; + case WFormatType.Markdown: + contentType = "text/markdown"; + break; } document.Save(stream, type); } @@ -378,6 +560,96 @@ private WDocument GetDocument(IFormCollection data) stream.Dispose(); return document; } + + [AcceptVerbs("Post")] + [HttpPost] + [EnableCors("AllowAllOrigins")] + [Route("CompareDocuments")] + public string CompareDocuments([FromForm] CompareParameter data) + { + if (data.OriginalFile == null || data.RevisedFile == null) + return null; + Stream originalDocumentStream = new MemoryStream(); + data.OriginalFile.CopyTo(originalDocumentStream); + originalDocumentStream.Position = 0; + Stream revisedDocumentStream = new MemoryStream(); + data.RevisedFile.CopyTo(revisedDocumentStream); + revisedDocumentStream.Position = 0; + string json = ""; + + using (WDocument originalDocument = new WDocument(originalDocumentStream, WFormatType.Docx)) + { + //Load the revised document. + using (WDocument revisedDocument = new WDocument(revisedDocumentStream, WFormatType.Docx)) + { + // Compare the original and revised Word documents. + originalDocument.Compare(revisedDocument); + WordDocument document = WordDocument.Load(originalDocument); + json = Newtonsoft.Json.JsonConvert.SerializeObject(document); + originalDocument.Dispose(); + revisedDocument.Dispose(); + document.Dispose(); + } + } + return json; + } + + [AcceptVerbs("Post")] + [HttpPost] + [EnableCors("AllowAllOrigins")] + [Route("CompareDocumentsFromUrl")] + public string CompareDocumentsFromUrl([FromBody] CompareUrlParameter data) + { + if (data.OriginalFilePath == null || data.RevisedFilePath == null) + return null; + string json = ""; + using (WDocument originalDocument = new WDocument(GetDocFromURL(data.OriginalFilePath).Result, WFormatType.Docx)) + { + using (WDocument revisedDocument = new WDocument(GetDocFromURL(data.RevisedFilePath).Result, WFormatType.Docx)) + { + originalDocument.Compare(revisedDocument); + WordDocument document = WordDocument.Load(originalDocument); + json = Newtonsoft.Json.JsonConvert.SerializeObject(document); + originalDocument.Dispose(); + revisedDocument.Dispose(); + document.Dispose(); + } + } + return json; + } + public class CompareUrlParameter + { + public string OriginalFilePath { get; set; } + public string RevisedFilePath { get; set; } + } + public class CompareParameter + { + public IFormFile OriginalFile { get; set; } + public IFormFile RevisedFile { get; set; } + } + + async Task GetDocFromURL(string url) + { + string documentPath = Path.Combine(path, url); + Stream stream = null; + if (System.IO.File.Exists(documentPath)) + { + byte[] bytes = System.IO.File.ReadAllBytes(documentPath); + stream = new MemoryStream(bytes); + } + else + { + bool result = Uri.TryCreate(url, UriKind.Absolute, out Uri uriResult) + && (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps); + if (result) + { + stream = GetDocumentFromURL(url).Result; + if (stream != null) + stream.Position = 0; + } + } + return stream; + } } } diff --git a/src/ej2-documenteditor-server/ej2-documenteditor-server.csproj b/src/ej2-documenteditor-server/ej2-documenteditor-server.csproj index 47e677f..d454384 100644 --- a/src/ej2-documenteditor-server/ej2-documenteditor-server.csproj +++ b/src/ej2-documenteditor-server/ej2-documenteditor-server.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 false Linux ..\docker-compose.dcproj @@ -43,13 +43,17 @@ - + - - - + + + + + + + From fde860dcb09a466c47ff9df7e626b4b552d94835 Mon Sep 17 00:00:00 2001 From: mohammedaffanc Date: Wed, 21 Aug 2024 11:10:52 +0530 Subject: [PATCH 2/5] 903621: Upgraded the .net version to .net 8.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3974a8f..32cd297 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app EXPOSE 80 ENV SYNCFUSION_LICENSE_KEY="" From 32e09836b6237b9d9384b41ea3e5e208fd9c5769 Mon Sep 17 00:00:00 2001 From: mohammedaffanc Date: Wed, 21 Aug 2024 18:27:25 +0530 Subject: [PATCH 3/5] 903621: Upgraded the .net version to .net 8.0 --- .../Controllers/DocumentEditorController.cs | 2 +- src/ej2-documenteditor-server/Program.cs | 103 ++++++++++++++++- src/ej2-documenteditor-server/Startup.cs | 109 ------------------ 3 files changed, 98 insertions(+), 116 deletions(-) delete mode 100644 src/ej2-documenteditor-server/Startup.cs diff --git a/src/ej2-documenteditor-server/Controllers/DocumentEditorController.cs b/src/ej2-documenteditor-server/Controllers/DocumentEditorController.cs index c4b7dd8..5ecd201 100644 --- a/src/ej2-documenteditor-server/Controllers/DocumentEditorController.cs +++ b/src/ej2-documenteditor-server/Controllers/DocumentEditorController.cs @@ -28,7 +28,7 @@ public class DocumentEditorController : Controller public DocumentEditorController(IHostingEnvironment hostingEnvironment) { _hostingEnvironment = hostingEnvironment; - path = Startup.path; + path = Program.path; } [AcceptVerbs("Post")] diff --git a/src/ej2-documenteditor-server/Program.cs b/src/ej2-documenteditor-server/Program.cs index a544dcd..7281fe6 100644 --- a/src/ej2-documenteditor-server/Program.cs +++ b/src/ej2-documenteditor-server/Program.cs @@ -1,18 +1,109 @@ -using Microsoft.AspNetCore; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; +using Syncfusion.EJ2.SpellChecker; +using Microsoft.AspNetCore.ResponseCompression; +using Newtonsoft.Json.Serialization; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.Hosting; +using Newtonsoft.Json; namespace EJ2DocumentEditorServer { public class Program { + internal static string path; + public static void Main(string[] args) { - BuildWebHost(args).Run(); + var builder = WebApplication.CreateBuilder(args); + + var MyAllowSpecificOrigins = "AllowAllOrigins"; + + var configuration = builder.Configuration; + var env = builder.Environment; + + builder.Services.AddControllers().AddNewtonsoftJson(options => + { + options.SerializerSettings.ContractResolver = new DefaultContractResolver(); + }); + + builder.Services.AddMemoryCache(); + + builder.Services.AddCors(options => + { + options.AddPolicy(MyAllowSpecificOrigins, policy => + { + policy.AllowAnyOrigin() + .AllowAnyMethod() + .AllowAnyHeader(); + }); + }); + + builder.Services.Configure(options => + { + options.Level = System.IO.Compression.CompressionLevel.Optimal; + }); + + builder.Services.AddResponseCompression(); + + var app = builder.Build(); + path = configuration["SPELLCHECK_DICTIONARY_PATH"]; + string jsonFileName = configuration["SPELLCHECK_JSON_FILENAME"]; + int cacheCount = int.TryParse(configuration["SPELLCHECK_CACHE_COUNT"], out int result) ? result : 1; + + path = string.IsNullOrEmpty(path) ? Path.Combine(env.ContentRootPath, "Data") : Path.Combine(env.ContentRootPath, path); + jsonFileName = string.IsNullOrEmpty(jsonFileName) ? Path.Combine(path, "spellcheck.json") : Path.Combine(path, jsonFileName); + + if (File.Exists(jsonFileName)) + { + string jsonImport = File.ReadAllText(jsonFileName); + List spellChecks = JsonConvert.DeserializeObject>(jsonImport); + List spellDictCollection = new List(); + string personalDictPath = string.Empty; + + foreach (var spellCheck in spellChecks) + { + spellDictCollection.Add(new DictionaryData(spellCheck.LanguadeID, Path.Combine(path, spellCheck.DictionaryPath), Path.Combine(path, spellCheck.AffixPath))); + personalDictPath = Path.Combine(path, spellCheck.PersonalDictPath); + } + + SpellChecker.InitializeDictionaries(spellDictCollection, personalDictPath, cacheCount); + } + + string licenseKey = configuration["SYNCFUSION_LICENSE_KEY"]; + if (!string.IsNullOrEmpty(licenseKey)) + { + Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(licenseKey); + } + + + if (app.Environment.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseHsts(); + } + + app.UseHttpsRedirection(); + app.UseRouting(); + app.UseCors("AllowAllOrigin"); + app.UseAuthorization(); + app.UseResponseCompression(); + + app.MapControllers(); + + app.Run(); } - public static IWebHost BuildWebHost(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseStartup() - .Build(); } } diff --git a/src/ej2-documenteditor-server/Startup.cs b/src/ej2-documenteditor-server/Startup.cs deleted file mode 100644 index bc68d71..0000000 --- a/src/ej2-documenteditor-server/Startup.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System.Collections.Generic; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Syncfusion.EJ2.SpellChecker; -using System.IO; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using Microsoft.AspNetCore.ResponseCompression; - -namespace EJ2DocumentEditorServer -{ - public class Startup - { - internal static string path; - public Startup(IConfiguration configuration, IHostingEnvironment env) - { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) - .AddEnvironmentVariables(); - - Configuration = builder.Build(); - path = Configuration["SPELLCHECK_DICTIONARY_PATH"]; - string jsonFileName = Configuration["SPELLCHECK_JSON_FILENAME"]; - int cacheCount; - if (!int.TryParse(Configuration["SPELLCHECK_CACHE_COUNT"], out cacheCount)) - { - cacheCount = 1; - } - //check the spell check dictionary path environment variable value and assign default data folder - //if it is null. - path = string.IsNullOrEmpty(path) ? Path.Combine(env.ContentRootPath, "Data") : Path.Combine(env.ContentRootPath, path); - //Set the default spellcheck.json file if the json filename is empty. - jsonFileName = string.IsNullOrEmpty(jsonFileName) ? Path.Combine(path, "spellcheck.json") : Path.Combine(path, jsonFileName) ; - if (System.IO.File.Exists(jsonFileName)) - { - string jsonImport = System.IO.File.ReadAllText(jsonFileName); - List spellChecks = JsonConvert.DeserializeObject>(jsonImport); - List spellDictCollection = new List(); - string personalDictPath = string.Empty; - //construct the dictionary file path using customer provided path and dictionary name - foreach (var spellCheck in spellChecks) - { - spellDictCollection.Add(new DictionaryData(spellCheck.LanguadeID, Path.Combine(path, spellCheck.DictionaryPath), Path.Combine(path, spellCheck.AffixPath))); - personalDictPath = Path.Combine(path, spellCheck.PersonalDictPath); - } - SpellChecker.InitializeDictionaries(spellDictCollection, personalDictPath, cacheCount); - } - } - - public IConfiguration Configuration { get; } - readonly string MyAllowSpecificOrigins = "MyPolicy"; - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddControllers(); - services.AddMemoryCache(); - services.AddControllers().AddNewtonsoftJson(options => - { - // Use the default property (Pascal) casing - options.SerializerSettings.ContractResolver = new DefaultContractResolver(); - }); - - services.AddCors(options => - { - options.AddPolicy(MyAllowSpecificOrigins, - builder => - { - builder.AllowAnyOrigin() - .AllowAnyMethod() - .AllowAnyHeader(); - }); - }); - services.Configure(options => options.Level = System.IO.Compression.CompressionLevel.Optimal); - services.AddResponseCompression(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env) - { - string license_key = Configuration["SYNCFUSION_LICENSE_KEY"]; - if (license_key!=null && license_key!=string.Empty) - Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(license_key); - app.UseDeveloperExceptionPage(); - app.UseCors("AllowAllOrigins"); - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - app.UseHsts(); - } - app.UseHttpsRedirection(); - app.UseRouting(); - app.UseAuthorization(); - app.UseCors(MyAllowSpecificOrigins); - app.UseResponseCompression(); - app.UseEndpoints(endpoints => - { - endpoints.MapControllers().RequireCors("MyPolicy"); - }); - } - - } -} From 6984314e2e8943ed196dffacc58a2c0671dd08de Mon Sep 17 00:00:00 2001 From: mohammedaffanc Date: Wed, 21 Aug 2024 18:28:57 +0530 Subject: [PATCH 4/5] 903621: Updated the Readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c8ea7f1..39517d8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The [Syncfusion **Word Processor (also known as Document Editor)**](https://www.syncfusion.com/javascript-ui-controls/js-word-processor?utm_source=docker&utm_medium=listing&utm_campaign=javascript-word-processor-docker) is a component with editing capabilities like Microsoft Word. It is used to create, edit, view, and print Word documents. It provides all the common word processing abilities, including editing text; formatting contents; resizing images and tables; finding and replacing text; importing, exporting, and printing Word documents; and using bookmarks and tables of contents. -This Docker project is the predefined Docker container for Syncfusion’s Word Processor backend functionalities. This server-side Web API project is targeting ASP.NET 8.0. +This Docker project is the predefined Docker container for Syncfusion’s Word Processor backend functionalities. This server-side Web API project is targeting ASP.NET Core 8.0. If you want to add new functionality or customize any existing functionalities, then create your own Docker file by referencing this Docker project. From 0f9a588bf8ea6bee38114cfc38d4682bcc5ce5ac Mon Sep 17 00:00:00 2001 From: mohammedaffanc Date: Tue, 27 Aug 2024 16:04:15 +0530 Subject: [PATCH 5/5] 903621: Added server side export endpoint. --- Dockerfile | 1 + src/ej2-documenteditor-server/ej2-documenteditor-server.csproj | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 32cd297..aafd3ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,7 @@ FROM build AS publish RUN dotnet publish -c Release -o /app FROM base AS final +RUN apt-get update && apt-get install -y libfontconfig WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "ej2-documenteditor-server.dll"] \ No newline at end of file diff --git a/src/ej2-documenteditor-server/ej2-documenteditor-server.csproj b/src/ej2-documenteditor-server/ej2-documenteditor-server.csproj index d454384..495f0c2 100644 --- a/src/ej2-documenteditor-server/ej2-documenteditor-server.csproj +++ b/src/ej2-documenteditor-server/ej2-documenteditor-server.csproj @@ -54,6 +54,7 @@ +