Skip to content

Commit 4c52533

Browse files
committed
923321: Changed the controller changes in .NET 6 minimal API
1 parent b2e175e commit 4c52533

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

ASP.NET Core/PdfViewerWebService_6.0 - Minimal API/PdfViewerWebService_6.0.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.0" />
12-
<PackageReference Include="Syncfusion.EJ2.PdfViewer.AspNet.Core" Version="*" />
12+
<PackageReference Include="Syncfusion.Compression.Net.Core" Version="*" />
13+
<PackageReference Include="Syncfusion.EJ2.AspNet.Core" Version="*" />
14+
<PackageReference Include="Syncfusion.EJ2.PdfViewer.AspNet.Core" Version="*" />
15+
<PackageReference Include="Syncfusion.Pdf.Net.Core" Version="*" />
16+
<PackageReference Include="Syncfusion.Pdf.Imaging.Net.Core" Version="*" />
1317
</ItemGroup>
1418

1519
</Project>

ASP.NET Core/PdfViewerWebService_6.0 - Minimal API/Program.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
using Newtonsoft.Json.Serialization;
55
using Syncfusion.EJ2.PdfViewer;
66
using System.Net;
7+
using System.Drawing;
8+
using Syncfusion.Pdf.Parsing;
9+
using Syncfusion.Pdf;
10+
using Syncfusion.Pdf.Graphics;
11+
using Syncfusion.Pdf.Interactive;
12+
using Syncfusion.Pdf.Redaction;
713

814
var builder = WebApplication.CreateBuilder(args);
915
var MyAllowSpecificOrigins = "MyPolicy";
@@ -382,11 +388,11 @@
382388
byteArray = stream.ToArray();
383389
finalbase64 = "data:application/pdf;base64," + Convert.ToBase64String(byteArray);
384390
stream.Dispose();
385-
return Content(finalbase64);
391+
return finalbase64;
386392
}
387393
}
388394

389-
return Content("data:application/pdf;base64," + "");
395+
return "data:application/pdf;base64," + "";
390396
});
391397

392398
//The Method used for apply the text in the full area of redaction rectangle

0 commit comments

Comments
 (0)