update 20260412

This commit is contained in:
Stefan Hutter
2026-04-12 08:32:01 +02:00
parent 7a28e0c2bb
commit a110be5021
82 changed files with 2405 additions and 190 deletions

View File

@@ -1,23 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using edoka_dms;
using Database;
using DOCGEN.Klassen;
using Database;
using System.Data;
using edoka_dms;
using Model;
using System.Diagnostics;
using NLog;
using System.Security.Policy;
using OfficePrinter;
using Syncfusion.XlsIO.Implementation.PivotAnalysis;
using OnDocOffice;
using System.Threading;
using System.IO;
using Syncfusion.XlsIO.Implementation.XmlSerialization;
using Syncfusion.DocIO.DLS;
using Syncfusion.DocToPDFConverter;
using Syncfusion.Pdf;
using Syncfusion.Windows.Forms.Chart;
using Syncfusion.XlsIO.Implementation.PivotAnalysis;
using Syncfusion.XlsIO.Implementation.XmlSerialization;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace DOCGEN.Generator
{
@@ -64,6 +67,21 @@ namespace DOCGEN.Generator
public clsdok Generate_Doc_EDOKA(string dokumentid, ref clsDocData docdata, bool useoffice = false, int OfficeSleep = 0, bool vbfilemanagement = false, bool editdoc = false, List<clsDocValue> APIValues=null)
{
//using (WordDocument document = new WordDocument(Path.GetFullPath(@"y:\test.docm"), Syncfusion.DocIO.FormatType.Docm))
//{
// //Instantiation of DocToPDFConverter for Word to PDF conversion
// using (DocToPDFConverter converter = new DocToPDFConverter())
// {
// //Converts Word document into PDF document
// using (PdfDocument pdfDocument = converter.ConvertToPDF(document))
// {
// //Saves the PDF document
// pdfDocument.Save(Path.GetFullPath(@"y:\test.pdf"));
// }
// }
// ;
//}
if (docdata.Bezeichnung.Contains("QDF"))
{
generate_docdata(dokumentid, ref docdata);

View File

@@ -1167,6 +1167,7 @@ namespace DOCGEN.Klassen
MemoryStream ms = new MemoryStream(Helper.EncodeExtensions.DecodeBase642ByteArray(base64));
WordDocument document = new WordDocument(ms, FormatType.Automatic);
CompatibilityMode compatibilityMode = document.Settings.CompatibilityMode;
set_compatibilitymode(ref document, docdata.CompatibilityMode);
Logging.Logging.Debug(compatibilityMode.ToString(), "ondoc sf", docdata.Dokumentid);
//switch (compatibilityMode)
@@ -1436,6 +1437,10 @@ namespace DOCGEN.Klassen
if (dv.FieldName.ToString() != "")
{
if (dv.FieldName.Contains("unterschrift"))
{
int a = 1;
}
if (dv.FieldName.ToString().Substring(0, 2) == "$$")
{
Replace_Text(ref document, dv.FieldName.ToString(), dv.Value.ToString());
@@ -1736,7 +1741,7 @@ namespace DOCGEN.Klassen
}
catch { }
try
{
@@ -1753,7 +1758,7 @@ namespace DOCGEN.Klassen
}
catch { }
try
{
@@ -1883,12 +1888,12 @@ namespace DOCGEN.Klassen
}
}
}
//document.UpdateDocumentFields();
//document.UpdateAlternateChunks();
MemoryStream destms = new MemoryStream();
if (formattype_original.ToString().ToUpper() == "DOTMXXX")
@@ -1900,7 +1905,7 @@ namespace DOCGEN.Klassen
{
document.Save(destms, formattype_original);
}
document.Close();
document.Dispose();
byte[] imageArray = destms.ToArray();