Tiny .NET 6 web app that accepts a JSON dataset and a FastReport template name, renders to PDF, and returns the bytes. Exists because System.Drawing is unsupported on .NET 8 Linux even with libgdiplus, but works on .NET 6 with `System.Drawing.EnableUnixSupport=true`. The main pwa_api (.NET 8) calls this over loopback HTTP. Endpoints: POST /render single template, returns one PDF POST /render/multi array of sections, merges into one PDF GET /health liveness probe Templates and Fonts are sourced at build time from the sibling pwa_api project so there's a single source of truth for .frx files. Deployed as pwa-pdf-service.service on api.pwabilling.com, listening on 127.0.0.1:7082, self-contained (no system .NET 6 runtime needed). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
32 lines
1.2 KiB
XML
32 lines
1.2 KiB
XML
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net6.0</TargetFramework>
|
|
<Nullable>enable</Nullable>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<RootNamespace>pwa_pdf_service</RootNamespace>
|
|
<AssemblyName>pwa_pdf_service</AssemblyName>
|
|
<InvariantGlobalization>false</InvariantGlobalization>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="FastReport.Core" Version="2021.3.0" />
|
|
<PackageReference Include="PdfSharpCore" Version="1.3.65" />
|
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<!-- FastReport templates and fonts shared from main API -->
|
|
<None Include="..\pwa_api\wwwroot\reports\**\*" Link="wwwroot\reports\%(RecursiveDir)%(Filename)%(Extension)">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Include="..\pwa_api\wwwroot\documents\**\*" Link="wwwroot\documents\%(RecursiveDir)%(Filename)%(Extension)">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Include="..\pwa_api\Fonts\**\*" Link="Fonts\%(RecursiveDir)%(Filename)%(Extension)">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
</ItemGroup>
|
|
|
|
</Project>
|