This example demonstrates how to use the DevExpress.Drawing package based on the SkiaSharp library instead of the System.Drawing library in an ASP.NET Core application to preview, print, or export DevExpress XtraReports.
The commands required to configure the host operating system environment for the DevExpress Drawing Engine are included in the docker file.
You can run the app on the Windows platform, or the Windows Subsystem for Linux or Docker. Select a platform from the Debug drop-down menu in the toolbar, and start debugging the app.
Run the application from the dotnet CLI on Windows, Linux and MacOS with the dotnet run
command.
To run the Docker container from the command line, build the Docker image. You should pass the DevExpress NuGet source URL as a secret to restore NuGet packages. Review the BuildKit documentation for more information.
set DX_NUGET=https://nuget.devexpress.com/some-nuget-token/api
docker build -t reporting-app --secret id=dxnuget,env=DX_NUGET .
docker run -p 8080:80 reporting-app:latest
export DX_NUGET=https://nuget.devexpress.com/some-nuget-token/api
DOCKER_BUILDKIT=1 docker build -t reporting-app --secret id=dxnuget,env=DX_NUGET .
docker run -p 8080:80 reporting-app:latest
The application page is available at the following URL: http://localhost:8080/.
-
At startup, call the
DevExpress.Drawing.Internal.DXDrawingEngine.ForceSkia
method to use the DevExpress Drawing Skia engine in the application. -
The
DockerfileFile
property in the project file specifies the name of the docker file to use in the project. Sample docker files for different operating systems are included in the project. You should edit the project file manually to replace the default Debian docker file with docker files for Alpine, Ubuntu or Amazon Linux. For more information on the build properties in a project file, review the following help topic: Container Tools build properties. -
The Debian docker file.
-
The Alpine docker file.
-
The Ubuntu docker file.
-
The Amazon Linux docker file.
-
The OpenSuse docker file.