Add fonts for pdf
This commit is contained in:
parent
d758f13951
commit
b9b1a121b7
8 changed files with 24 additions and 1 deletions
|
|
@ -14,6 +14,8 @@ namespace ShiftScheduler.Services
|
||||||
static PdfExportService()
|
static PdfExportService()
|
||||||
{
|
{
|
||||||
QuestPDF.Settings.License = LicenseType.Community;
|
QuestPDF.Settings.License = LicenseType.Community;
|
||||||
|
QuestPDF.Settings.FontDiscoveryPaths.Clear();
|
||||||
|
QuestPDF.Settings.FontDiscoveryPaths.Add("fonts");
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] GenerateMonthlySchedulePdf(List<ShiftWithTransport> shiftsWithTransport)
|
public byte[] GenerateMonthlySchedulePdf(List<ShiftWithTransport> shiftsWithTransport)
|
||||||
|
|
@ -28,7 +30,7 @@ namespace ShiftScheduler.Services
|
||||||
{
|
{
|
||||||
container.Page(page =>
|
container.Page(page =>
|
||||||
{
|
{
|
||||||
page.Margin(30);
|
page.Margin(15);
|
||||||
page.Size(PageSizes.A4.Landscape());
|
page.Size(PageSizes.A4.Landscape());
|
||||||
page.DefaultTextStyle(x => x.FontSize(10));
|
page.DefaultTextStyle(x => x.FontSize(10));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,25 @@
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="fonts\NotoEmoji-Bold.ttf">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="fonts\NotoEmoji-Light.ttf">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="fonts\NotoEmoji-Medium.ttf">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="fonts\NotoEmoji-Regular.ttf">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="fonts\NotoEmoji-SemiBold.ttf">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="fonts\NotoEmoji-VariableFont_wght.ttf">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
BIN
Services/fonts/NotoEmoji-Bold.ttf
Normal file
BIN
Services/fonts/NotoEmoji-Bold.ttf
Normal file
Binary file not shown.
BIN
Services/fonts/NotoEmoji-Light.ttf
Normal file
BIN
Services/fonts/NotoEmoji-Light.ttf
Normal file
Binary file not shown.
BIN
Services/fonts/NotoEmoji-Medium.ttf
Normal file
BIN
Services/fonts/NotoEmoji-Medium.ttf
Normal file
Binary file not shown.
BIN
Services/fonts/NotoEmoji-Regular.ttf
Normal file
BIN
Services/fonts/NotoEmoji-Regular.ttf
Normal file
Binary file not shown.
BIN
Services/fonts/NotoEmoji-SemiBold.ttf
Normal file
BIN
Services/fonts/NotoEmoji-SemiBold.ttf
Normal file
Binary file not shown.
BIN
Services/fonts/NotoEmoji-VariableFont_wght.ttf
Normal file
BIN
Services/fonts/NotoEmoji-VariableFont_wght.ttf
Normal file
Binary file not shown.
Loading…
Reference in a new issue