EvoPdf Next for .NET 14.86.1 - demo applications
================================================

This archive contains two demo applications:

  AspNetDemo    an ASP.NET Core application with a page for every feature of the library
  ConsoleDemo   a small console application that converts a URL to a PDF document


The source files of each demo exist once. The platform and the .NET version are chosen by opening the
matching project file, so nothing has to be copied or edited to switch between them. Each
project builds into its own bin and obj subfolder, so the projects in a folder never
overwrite each other's output.


Build only the project you need
-------------------------------

Open the single project file for the platform you are testing. In Visual Studio use File,
Open, Project/Solution and pick the .csproj file, or double click it in the file explorer.
Each project brings the rendering engine of its own platform, so building the one you target
gives you exactly what you need to run and to publish.


Which project file to open
--------------------------

  ..._Windows_net10.0.csproj               Windows x64
  ..._Windows.Arm64_net10.0.csproj         Windows ARM64
  ..._Linux_net10.0.csproj                 Linux x64
  ..._Linux.Arm64_net10.0.csproj           Linux ARM64
  ..._MacOS_net10.0.csproj                 macOS Apple Silicon (ARM64)
  ..._MultiPlatform_net10.0.csproj         Windows x64 and Linux x64 in one application
  ..._MultiPlatform.Arm64_net10.0.csproj   Windows ARM64 and Linux ARM64 in one application

Note that the package and project names carry the architecture only when it is not x64, with
one exception: EvoPdf.Next.MacOS is the Apple Silicon package, there is no macOS x64 build.

Each of the seven projects above comes in a net10.0 and a net8.0 variant:

  net10.0    Visual Studio 2026, or the dotnet command line with the .NET 10 SDK
  net8.0     Visual Studio 2022, or the dotnet command line with the .NET 8 SDK or later

Visual Studio 2022 cannot target .NET 10; opening a net10.0 project there reports
NETSDK1233. Both .NET versions are long term support releases.


Running the ASP.NET Core demo
-----------------------------

From the command line, in the AspNetDemo folder:

  dotnet run --project EvoPdf_Next_AspNetDemo_Windows_net10.0.csproj

The demo opens in the browser at http://localhost:27100. The address, and the browser that
opens, come from Properties/launchSettings.json, a file that dotnet run and Visual Studio
read when they start the application during development.

To publish, give each project its own output folder, because all the projects of a demo
share one source folder:

  dotnet publish -c Release -r win-x64 -o publish/windows-x64-net10.0 EvoPdf_Next_AspNetDemo_Windows_net10.0.csproj

Then run the application from the publish folder, so that it finds its content files:

  cd publish/windows-x64-net10.0
  dotnet EvoPdf_Next_AspNetDemo_Windows_net10.0.dll

Properties/launchSettings.json is not copied to the publish folder, so the published
application listens on http://localhost:5000, the default address of ASP.NET Core. To use
the same address as in development, add it to the command:

  dotnet EvoPdf_Next_AspNetDemo_Windows_net10.0.dll --urls http://localhost:27100

or set the ASPNETCORE_URLS environment variable to http://localhost:27100.


Running the console demo
------------------------

From the command line, in the ConsoleDemo folder, with the URL to convert after the --
separator:

  dotnet run --project EvoPdf_Next_ConsoleDemo_Windows_net10.0.csproj -- "https://www.example.com"

The PDF is written to output.pdf, on A4 pages, with the page laid out as in a 1024 pixel
browser window and scaled to the page width. Options go before the URL; run the console demo
without arguments to list them all. Examples, one for each page layout:

  The same layout with a 1280 pixel browser window, on A4 landscape pages:
  dotnet run --project EvoPdf_Next_ConsoleDemo_Windows_net10.0.csproj -- /outFileName:fit.pdf /htmlViewerWidth:1280 /orientation:Landscape "https://www.example.com"

  A page designed for the paper size, laid out at the width of Letter pages:
  dotnet run --project EvoPdf_Next_ConsoleDemo_Windows_net10.0.csproj -- /outFileName:page-width.pdf /layout:LayoutAtPageWidth /pageSize:Letter "https://www.example.com"

  The output of the Save as PDF command of Chrome:
  dotnet run --project EvoPdf_Next_ConsoleDemo_Windows_net10.0.csproj -- /outFileName:chrome.pdf /layout:PrintLikeChrome "https://www.example.com"

  A page as wide as the browser window, with all the content on one page:
  dotnet run --project EvoPdf_Next_ConsoleDemo_Windows_net10.0.csproj -- /outFileName:window.pdf /layout:PageWidthFromBrowserWindow /singlePage:true "https://www.example.com"


License
-------

Without a license the library runs in demo mode and stamps the generated documents. The
ASP.NET demo applies the key in one place, the DemoSettings class in the Models/Settings
folder, and it can also be changed at runtime on the Global Settings page. The console
demo sets it at the start of Program.cs.


Documentation: https://www.evopdf.com/help/evopdf-next-dotnet/
Samples on GitHub: https://github.com/EvoPdf/evopdf-next-samples
