Update 20260109

This commit is contained in:
Stefan Hutter
2026-01-09 08:37:07 +01:00
parent e377f08ccd
commit 49155d898f
229 changed files with 28984 additions and 39486 deletions

View File

@@ -205,7 +205,7 @@ namespace DOCGEN.Klassen
MemoryStream mssign = new MemoryStream(Convert.FromBase64String(unterschrift));
System.Drawing.Image img = System.Drawing.Image.FromStream(mssign);
Shape signature = bm.BookmarkStart.OwnerParagraph.AppendShape(Syncfusion.DocIO.DLS.AutoShapeType.Rectangle, 124, 52);
signature.TextFrame.InternalMargin.Top = 0;
signature.TextFrame.InternalMargin.Left = 0;
@@ -220,7 +220,7 @@ namespace DOCGEN.Klassen
signature.WrapFormat.TextWrappingStyle = TextWrappingStyle.Behind;
signature.LineFormat.DashStyle = LineDashing.Solid;
signature.LineFormat.Color = Color.White;
signature.WrapFormat.AllowOverlap = true;
signature.VerticalPosition = signature.VerticalPosition - 51;
@@ -352,13 +352,13 @@ namespace DOCGEN.Klassen
IWParagraph p;
try
{
p = section.HeadersFooters.FirstPageHeader.Paragraphs[section.HeadersFooters.FirstPageHeader.Paragraphs.Count - 1];
}
catch { p = section.HeadersFooters.FirstPageHeader.AddParagraph(); }
BookmarkStart bookmarkStart = new BookmarkStart(document, "TGEDKCompanyBBEB99");
BookmarkEnd bookmarkEnd = new BookmarkEnd(document, "TGEDKCompanyBBEB99");
p.ChildEntities.Insert(0, bookmarkStart);
@@ -578,8 +578,8 @@ namespace DOCGEN.Klassen
//Accesses the Body of section where all the contents in document are apart
WTextBody sectionBody = section.Body;
IterateTextBody(sectionBody);
}
}
if (apivalue.Type == "Absatz")
@@ -627,6 +627,51 @@ namespace DOCGEN.Klassen
}
}
catch { }
try
{
foreach (CLMDocItem item in docdata.CLMDocItems)
{
if (item.itemvalue.ToString() != "" && item.type != null)
{
foreach (WSection section in document.Sections)
//Iterates through section child elements
foreach (WTextBody textBody in section.ChildEntities)
{
//Iterates through form fields
foreach (WFormField formField in textBody.FormFields)
{
if (formField.Name == item.field.ToString())
{
switch (item.type.ToString())
{
case "4": //Text and CheckBox
string type = formField.FieldType.ToString();
if (type == "FieldFormCheckBox")
{
WCheckBox cb = (WCheckBox)formField;
if (item.itemvalue.ToString().ToUpper() == "X")
{
cb.Checked = true;
}
}
else
{
formField.Text = item.itemvalue.ToString();
}
break;
case "5": //Image
break;
}
}
}
}
}
}
}
catch { }
//gaga
//if (docdata.As_Faksimile == "True" && serienbrief==true)
@@ -674,7 +719,7 @@ namespace DOCGEN.Klassen
}
foreach (textreplace tr in docdata.TextToReplace)
{
Replace_Text(ref document,tr.TextToFind, tr.TextToReplace);
Replace_Text(ref document, tr.TextToFind, tr.TextToReplace);
}
if (locked)
{
@@ -686,7 +731,7 @@ namespace DOCGEN.Klassen
foreach (clsDocMacro dm in docdata.DocMacros)
{
switch (dm.Name.ToUpper())
{
case "DOKUMENTSCHUETZEN":
@@ -763,9 +808,9 @@ namespace DOCGEN.Klassen
}
else
{
document.Protect(ProtectionType.NoProtection, "Australia");
if (variable != "")
{
try
@@ -783,7 +828,7 @@ namespace DOCGEN.Klassen
paragraph.Items.Insert(1, bookmarkEnd);
}
document.Protect(ProtectionType.AllowOnlyFormFields, "Australia");
}
}
}
@@ -945,7 +990,7 @@ namespace DOCGEN.Klassen
paragraph.ChildEntities.RemoveAt(index);
// Insert the new text ranges (in order: closing tag, bold text, opening tag) into the paragraph.
// paragraph.ChildEntities.Insert(index, endTextRange);
// paragraph.ChildEntities.Insert(index, endTextRange);
paragraph.ChildEntities.Insert(index, boldTextRange);
//paragraph.ChildEntities.Insert(index, startTextRange);
}
@@ -1275,7 +1320,7 @@ namespace DOCGEN.Klassen
{
barcodeimage = Barcode.Get_Datamatrix(DataMatrix.net.DmtxScheme.DmtxSchemeAscii, docData.barcode_content, 6, 6, 0, "Right", docData.barcode_text + docData.barcode_zusatz, docData.Zusatz_Font, docData.Zusatz_FontSize);
}
//barcodeimage = AutoSizeImage(barcodeimage, docData.barcode_width, docData.barcode_height, false);
//barcodeimage = AutoSizeImage(barcodeimage, docData.barcode_width, docData.barcode_height, false);
return barcodeimage;
break;
default:
@@ -1528,7 +1573,7 @@ namespace DOCGEN.Klassen
IWSection section = document.Sections[0];
IWParagraph paragraph = section.HeadersFooters.Header.AddParagraph();
string b64 = Newtonsoft.Json.JsonConvert.DeserializeObject<string>(get_image(4, -1, 0));
string b64 = Newtonsoft.Json.JsonConvert.DeserializeObject<string>(get_image(4, -1, 0));
byte[] imageBytes = Convert.FromBase64String(b64);
using (var ms = new MemoryStream(imageBytes, 0, imageBytes.Length))
@@ -1536,7 +1581,7 @@ namespace DOCGEN.Klassen
System.Drawing.Image image = System.Drawing.Image.FromStream(ms);
paragraph.AppendPicture(image);
}
////Get the Word document section.
//IWSection section = document.Sections[0];

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.