[feat:] enable/disable label export (to only export running sheets
This commit is contained in:
+11
-2
@@ -92,6 +92,8 @@ public class PdfBuilder
|
||||
public void CreateAddressLabelPdfFromAddressSetWithPlaceholder(int addressSetId, string placeholderText, bool pvst,
|
||||
string outputPath)
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
// Find the AddressSet by ID
|
||||
@@ -174,9 +176,16 @@ public class PdfBuilder
|
||||
|
||||
string output_inter = outputPath.Replace(".pdf", "-international.pdf");
|
||||
|
||||
if(addresses_german.Count > 0) CreateAddressLabelPdfWithPlaceholder(addresses_german, placeholderText, outputPath, pvst);
|
||||
if(addresses_inter.Count > 0) CreateAddressLabelPdfWithPlaceholder(addresses_inter, placeholderText, output_inter, pvst);
|
||||
if(Settings._instance.pdfExport.expLabEnable == false)
|
||||
{
|
||||
Logger.Log("Skipping label pdf generation cause it was disabled by user");
|
||||
} else
|
||||
{
|
||||
if(addresses_german.Count > 0) CreateAddressLabelPdfWithPlaceholder(addresses_german, placeholderText, outputPath, pvst);
|
||||
if(addresses_inter.Count > 0) CreateAddressLabelPdfWithPlaceholder(addresses_inter, placeholderText, output_inter, pvst);
|
||||
}
|
||||
|
||||
|
||||
if (_settings.exportRunningSheets)
|
||||
{
|
||||
ExportRunningSheets(addressSetId, outputPath);
|
||||
|
||||
Reference in New Issue
Block a user