Фикс пути до темплейта
All checks were successful
Build and deploy / Publish image (push) Successful in 5m0s

This commit is contained in:
2025-01-02 17:09:47 +03:00
parent 200924e02d
commit 00f65b4ca3
3 changed files with 29 additions and 24 deletions

View File

@@ -1,43 +1,48 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\.dockerignore"> <Content Include="..\.dockerignore">
<Link>.dockerignore</Link> <Link>.dockerignore</Link>
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<UpToDateCheckBuilt Include="wwwroot/css/site.css" Set="Css" /> <UpToDateCheckBuilt Include="wwwroot/css/site.css"
<UpToDateCheckBuilt Include="tailwind.config.js" Set="Css" /> Set="Css" />
<UpToDateCheckBuilt Include="tailwind.config.js"
Set="Css" />
</ItemGroup> </ItemGroup>
<!-- <Target Name="Tailwind" BeforeTargets="Build"> <!-- <Target Name="Tailwind" BeforeTargets="Build">
<Exec Command="npm run css:build"/> <Exec Command="npm run css:build"/>
</Target> --> </Target> -->
<ItemGroup> <ItemGroup>
<PackageReference Include="BlazorPageScript" Version="1.0.0" /> <PackageReference Include="BlazorPageScript"
<PackageReference Include="DocumentFormat.OpenXml" Version="3.2.0" /> Version="1.0.0" />
<PackageReference Include="Gotenberg.Sharp.API.Client" Version="2.4.0" /> <PackageReference Include="DocumentFormat.OpenXml"
<PackageReference Include="Microsoft.Identity.Web" Version="3.2.2" /> Version="3.2.0" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="3.2.2" /> <PackageReference Include="Gotenberg.Sharp.API.Client"
<PackageReference Include="NPetrovich" Version="2.0.1" /> Version="2.4.0" />
<PackageReference Include="Microsoft.Identity.Web"
Version="3.2.2" />
<PackageReference Include="Microsoft.Identity.Web.UI"
Version="3.2.2" />
<PackageReference Include="NPetrovich"
Version="2.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<_ContentIncludedByDefault Remove="wwwroot\bootstrap\bootstrap.min.css" /> <_ContentIncludedByDefault Remove="wwwroot\bootstrap\bootstrap.min.css" />
<_ContentIncludedByDefault Remove="wwwroot\bootstrap\bootstrap.min.css.map" /> <_ContentIncludedByDefault Remove="wwwroot\bootstrap\bootstrap.min.css.map" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="PDFCache\" /> <Folder Include="PDFCache\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
</Project> <Content Include="Templates\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

View File

@@ -23,7 +23,7 @@ public class StatementGenerator(GotenbergSharpClient gotenbergSharpClient) : ISt
public async Task<MemoryStream> GenerateStatementAsync(UserData userData) public async Task<MemoryStream> GenerateStatementAsync(UserData userData)
{ {
byte[] textByteArray = File.ReadAllBytes(@"C:\Users\Sergey\Desktop\test.docx"); byte[] textByteArray = File.ReadAllBytes("Templates/ictis.docx");
MemoryStream stream = new MemoryStream(); MemoryStream stream = new MemoryStream();
stream.Write(textByteArray, 0, textByteArray.Length); stream.Write(textByteArray, 0, textByteArray.Length);
using (WordprocessingDocument doc = WordprocessingDocument.Open(stream, true)) using (WordprocessingDocument doc = WordprocessingDocument.Open(stream, true))

Binary file not shown.