update 20250108

This commit is contained in:
Stefan Hutter
2025-01-08 16:21:39 +01:00
parent af418d0114
commit bd4598e4a8
28 changed files with 71 additions and 10 deletions

View File

@@ -80,7 +80,7 @@ namespace DOCGEN
return "";
}
public string get_word_vorlage(int vorlagenr)
public string get_word_vorlage(int vorlagenr, int dokumenttypnr)
{
DB db = new DB(connectionstring);
string sql = "Select dbo.BinaryToBase64(vorlage) as Data from office_vorlage_datei where office_vorlage_dateinr=" + vorlagenr;
@@ -88,7 +88,13 @@ namespace DOCGEN
string base64 = db.dsdaten.Tables[0].Rows[0][0].ToString();
MemoryStream ms = new MemoryStream(Helper.EncodeExtensions.DecodeBase642ByteArray(base64));
WordDocument document = new WordDocument(ms, FormatType.Automatic);
db.Get_Tabledata("Select isnull(CompatibilityMode,'') from dokumenttyp where dokumenttypnr=" + dokumenttypnr.ToString(), false, true);
SyncFWord sfw = new SyncFWord("", "");
sfw.set_compatibilitymode(ref document, db.dsdaten.Tables[0].Rows[0][0].ToString());
sfw = null;
var formattype_original = document.ActualFormatType;
MemoryStream destms = new MemoryStream();
if (formattype_original.ToString().ToUpper() == "DOTMXXX")
{