Fallback to file name for title if title not set

This commit is contained in:
2026-02-17 17:20:51 +09:00
parent 3b04f73270
commit c9206bb065
+8 -1
View File
@@ -585,7 +585,14 @@ class MainViewModel : BaseViewModel, IFontResolver
imageTitlePar.Format.Font.Size = 12; imageTitlePar.Format.Font.Size = 12;
imageTitlePar.Format.Font.Bold = true; imageTitlePar.Format.Font.Bold = true;
imageTitlePar.Format.Font.Name = "Noto Sans JP"; // has english letters in it, too imageTitlePar.Format.Font.Name = "Noto Sans JP"; // has english letters in it, too
imageTitlePar.AddText(file.Title); if (string.IsNullOrWhiteSpace(file.Title))
{
imageTitlePar.AddText(file.FileName);
}
else
{
imageTitlePar.AddText(file.Title);
}
var receiptDatePar = section.AddParagraph(); var receiptDatePar = section.AddParagraph();
receiptDatePar.Format.Alignment = ParagraphAlignment.Center; receiptDatePar.Format.Alignment = ParagraphAlignment.Center;
receiptDatePar.Format.Font.Size = 12; receiptDatePar.Format.Font.Size = 12;