update 20250209

This commit is contained in:
Stefan Hutter
2025-02-09 20:44:54 +01:00
parent c316b40507
commit f8f1404ef9
136 changed files with 549632 additions and 150 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -25,6 +25,8 @@ using System.Net;
using Microsoft.VisualBasic.CompilerServices;
using Database;
using System.Runtime.InteropServices.ComTypes;
using Syncfusion.CompoundFile.DocIO;
using Helper;
namespace OnDocOffice
@@ -1654,28 +1656,22 @@ namespace OnDocOffice
public void insert_unterschrift(string bookmark, string imagepath)
{
Logging.Logging.Debug("Insert Unterschrift :"+ bookmark, "OnDoc", imagepath);
if (imagepath == "") return;
object missing = Type.Missing;
Microsoft.Office.Interop.Word.Range myRange = docWord.Bookmarks[bookmark].Range;
Microsoft.Office.Interop.Word.Bookmark bm = docWord.Bookmarks[bookmark];
Microsoft.Office.Interop.Word.Range myRange = docWord.Bookmarks[bookmark].Range;
float vertical = bm.Range.Information[Microsoft.Office.Interop.Word.WdInformation.wdVerticalPositionRelativeToPage];
float horizontal = bm.Range.Information[Microsoft.Office.Interop.Word.WdInformation.wdHorizontalPositionRelativeToPage];
vertical = vertical - 50;
docWord.Bookmarks[bookmark].Select();
Microsoft.Office.Interop.Word.Shape myshape1 = docWord.Shapes.AddShape(1, horizontal, vertical, 120, 50);
myshape1.Fill.UserPicture(imagepath);
//myshape1.Line.Weight = -2;
myshape1.Name = "Unterschrift" + "_" + bookmark;
myshape1.Line.Visible = Microsoft.Office.Core.MsoTriState.msoFalse;
Logging.Logging.Debug("Shapename", "OnDoc", myshape1.Name);
Microsoft.Office.Interop.Word.Shape myShape = docWord.Shapes.AddPicture(@"E:\Software-Projekte\OnDoc\Unterschriften\1.jpg", false, true, 0, 0, 120, 50, myRange);
myShape.WrapFormat.Type = Microsoft.Office.Interop.Word.WdWrapType.wdWrapTight;
myShape.RelativeHorizontalPosition = Microsoft.Office.Interop.Word.WdRelativeHorizontalPosition.wdRelativeHorizontalPositionPage;
myShape.Left = horizontal;
myShape.RelativeVerticalPosition = Microsoft.Office.Interop.Word.WdRelativeVerticalPosition.wdRelativeVerticalPositionPage;
myShape.Top = vertical - myShape.Height;
myShape.Name= "Unterschrift" + "_" + bookmark;
myShape.WrapFormat.Type = Microsoft.Office.Interop.Word.WdWrapType.wdWrapBehind;
myShape.ZOrder(Microsoft.Office.Core.MsoZOrderCmd.msoSendBackward);
myShape.Select();
return;
@@ -1691,12 +1687,12 @@ namespace OnDocOffice
//Microsoft.Office.Interop.Word.Shape myshape = docWord.Shapes.AddTextbox(Microsoft.Office.Core
//.MsoTextOrientation.msoTextOrientationHorizontal, (float)horizontal,
//(float)vertical, 120, 50,bm);
//(float)vertical, 120, 50, missing);
//myshape.Name = "Unterschrift" + "_" + bookmark;
//myshape.TextFrame.ContainingRange.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
//myshape.TextFrame.ContainingRange.Borders.InsideLineStyle = WdLineStyle.wdLineStyleNone;
//myshape.Fill.UserPicture(imagepath);
////myshape.Fill.UserPicture(@"E:\Software-Projekte\OnDoc\Unterschriften\1.jpg");
//myshape.Fill.UserPicture(@"E:\Software-Projekte\OnDoc\Unterschriften\1.jpg");
//myshape.WrapFormat.Type = Microsoft.Office.Interop.Word.WdWrapType.wdWrapBehind;
//myshape.Line.Visible = Microsoft.Office.Core.MsoTriState.msoFalse;
}