[feat:] pvst-integration (logo missing, will be in the next commits)

This commit is contained in:
2026-06-30 15:27:44 +02:00
parent 029a61c733
commit 49822a1960
4 changed files with 17 additions and 10 deletions
+9 -3
View File
@@ -94,7 +94,7 @@ public class PdfBuilder
/// <param name="addressSetId">The ID of the AddressSet to use</param>
/// <param name="placeholderText">Text for the first cell (top-left)</param>
/// <param name="outputPath">Path where the PDF should be saved</param>
public void CreateAddressLabelPdfFromAddressSetWithPlaceholder(int addressSetId, string placeholderText,
public void CreateAddressLabelPdfFromAddressSetWithPlaceholder(int addressSetId, string placeholderText, bool pvst,
string outputPath)
{
try
@@ -138,6 +138,9 @@ public class PdfBuilder
if (!addressSet.KasPersons[i].IsGermany()) continue;
var addr = AddressCreator.CreateFinalMarkdownString(addressSet.KasPersons[i].id);
if (string.IsNullOrWhiteSpace(addr)) continue;
if (pvst)
senderLineID += $"</font6>**PvSt, DP AG, Entgelt bezahlt, ZKZ {Settings._instance.pdfExport.rsZKZ}**\n<font6>";
if (addressSet.KasPersons[i].refsid != null || addressSet.KasPersons[i].refsid != 0)
senderLineID += $"ID: {addressSet.KasPersons[i].refsid}\n</font6>";
else
@@ -155,6 +158,9 @@ public class PdfBuilder
if (addressSet.KasPersons[i].IsGermany()) continue;
var addr = AddressCreator.CreateFinalMarkdownString(addressSet.KasPersons[i].id);
if (string.IsNullOrWhiteSpace(addr)) continue;
if (pvst)
senderLineID += $"</font6>**PvSt, DP AG, Entgelt bezahlt, ZKZ {Settings._instance.pdfExport.rsZKZ}**\n<font6>";
if (addressSet.KasPersons[i].refsid != null || addressSet.KasPersons[i].refsid != 0)
senderLineID += $"ID: {addressSet.KasPersons[i].refsid}\n</font6>";
else
@@ -458,7 +464,7 @@ public class PdfBuilder
}
}
return max > 0 ? max * 0.8 : _regularFont.GetHeight();
return max > 0 ? max * 0.88 : _regularFont.GetHeight();
}
private List<List<TextRun>> WrapRunsToLines(XGraphics gfx, List<TextToken> tokens, double maxWidth)
@@ -1246,7 +1252,7 @@ public class PdfBuilder
public List<(int, string, string, string, int)> GroupAddresses(int setID)
{
int grpcount = Settings._instance.pdfExport.rsNumGrouped; // Amount of addresses per group
int stpoint = Settings._instance.pdfExport.rsPlzStartpoint; // group starting point (first n characters of the plz)
int stpoint = 2; // group starting point (first n characters of the plz)
KasAddressList list = Settings._instance.addressSets.GetAddressSetByID(setID);
if (list == null)
throw new Exception("AddressSet nicht gefunden");