Update 20260514

This commit is contained in:
Stefan Hutter
2026-05-14 10:49:27 +02:00
parent d3d7b06872
commit 83a0703324
247 changed files with 900388 additions and 222 deletions
+75 -1
View File
@@ -247,11 +247,13 @@ namespace DOCGEN.Klassen
case "8":
case "9":
case "10":
case "13":
case "14":
case "15":
case "16":
case "18":
case "20":
try
{
if (item.itemvalue == "x") { item.itemvalue = "X"; }
@@ -1052,6 +1054,63 @@ namespace DOCGEN.Klassen
}
}
private void Insert_Image(ref WordDocument document, string bookmark, string image, string ileft="", string itop="", string iwidth="", string iheight="")
{
BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document);
Syncfusion.DocIO.DLS.Bookmark bm = document.Bookmarks[bookmark];
MemoryStream mssign = new MemoryStream(Convert.FromBase64String(image));
System.Drawing.Image img = System.Drawing.Image.FromStream(mssign);
if (ileft == "") {ileft = "0";}
if (itop=="") { itop="0";}
if (iwidth == "") { iwidth = img.Width.ToString(); }
if (iheight == "") { iheight = img.Height.ToString(); }
System.Drawing.Image img1 = Resize(img, Convert.ToInt32(iwidth), Convert.ToInt32(iheight), true, true);
int iitop = Convert.ToInt32(itop) * -1;
int top = Convert.ToInt32(Convert.ToInt32(iitop) + Convert.ToInt32(img1.Height));
top = Convert.ToInt32(Convert.ToInt32(itop));
int height = Convert.ToInt32(Convert.ToInt32(img1.Height));
int left = Convert.ToInt32(Convert.ToInt32(ileft));
int width = Convert.ToInt32(Convert.ToInt32(img1.Width));
Shape signature = bm.BookmarkStart.OwnerParagraph.AppendShape(Syncfusion.DocIO.DLS.AutoShapeType.Rectangle, Convert.ToInt32(img1.Width), Convert.ToInt32(img1.Height));
signature.TextFrame.InternalMargin.Top = 0;
signature.TextFrame.InternalMargin.Left = 0;
signature.TextFrame.InternalMargin.Bottom = 0;
signature.TextFrame.InternalMargin.Right = 0;
//IWParagraph p = bm.BookmarkStart.OwnerParagraph;
//IWPicture u = p.AppendPicture(img);
IWParagraph sigparagraph = signature.TextBody.AddParagraph();
signature.WrapFormat.TextWrappingStyle = TextWrappingStyle.Behind;
signature.LineFormat.DashStyle = LineDashing.Solid;
signature.LineFormat.Color = Color.White;
signature.WrapFormat.AllowOverlap = true;
signature.WrapFormat.TextWrappingStyle = TextWrappingStyle.Behind;
signature.HorizontalPosition = signature.HorizontalPosition + left;
signature.VerticalPosition = signature.VerticalPosition - top;
IWPicture p = sigparagraph.AppendPicture(img);
p.Width = Convert.ToInt32(img1.Width);
p.Height = Convert.ToInt32(img1.Height); ;
//signature.Name = "Unterschrift_" + bookmark;
img = null;
img1 = null;
bm = null;
mssign = null;
signature = null;
}
private void Insert_CLMImage(CLMDocItem item, ref WordDocument document, Boolean inline = false, Boolean multiimages = false)
{
BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document);
@@ -1560,7 +1619,7 @@ namespace DOCGEN.Klassen
}
}
if (apivalue.Type == "Absatz")
if (apivalue.Type == "Absatz" || apivalue.Type=="Image")
{
if (apivalue.Value != "Ja")
{
@@ -1572,6 +1631,20 @@ namespace DOCGEN.Klassen
document.Bookmarks.Remove(bookmark);
}
if (apivalue.Type == "Image")
{
try
{
// string[] imagesize = apivalue.ImageSize.Split(',');
// Insert_Image(ref document, apivalue.Tag, apivalue.Value, imagesize[0], imagesize[1], imagesize[2], imagesize[3]);
}
catch
{
}
//Insert_Image(ref document, apivalue.Tag, apivalue.Value);
}
}
else
{
@@ -1596,6 +1669,7 @@ namespace DOCGEN.Klassen
if (!apivalue.Value.Contains("<pdel;"))
{
apivalue.Value=apivalue.Value.Replace("\n", Environment.NewLine);
BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document);
bookmarkNavigator.MoveToBookmark(apivalue.Tag);
bookmarkNavigator.ReplaceBookmarkContent(apivalue.Value, true);
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.
@@ -66,8 +66,6 @@ X:\docdemo\EDOKA_2024\DOCGEN\bin\Debug\EDOKA_Barcode.dll
X:\docdemo\EDOKA_2024\DOCGEN\bin\Debug\BarcodeStandard.dll
X:\docdemo\EDOKA_2024\DOCGEN\bin\Debug\EDOKA_Barcode.pdb
X:\docdemo\EDOKA_2024\DOCGEN\bin\Debug\EDOKA_Barcode.dll.config
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DocGen.csproj.AssemblyReference.cache
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DocGen.csproj.CoreCompileInputs.cache
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\libSkiaSharp.dylib
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\x86\libSkiaSharp.dll
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\x64\libSkiaSharp.dll
@@ -153,6 +151,8 @@ E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\vbBarcodes.pdb
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\vbBarcodes.xml
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\FastReport.xml
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\Syncfusion.Shared.Base.xml
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DocGen.csproj.AssemblyReference.cache
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DocGen.csproj.CoreCompileInputs.cache
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DocGen.csproj.Up2Date
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DOCGEN.dll
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DOCGEN.pdb
Binary file not shown.
Binary file not shown.