update 2024-09-11
This commit is contained in:
@@ -193,6 +193,10 @@ namespace DOCGEN.Klassen
|
||||
{
|
||||
Insert_Barcode(document, docdata);
|
||||
}
|
||||
if (docdata.PrintLogo == true)
|
||||
{
|
||||
insert_Logo(document, docdata);
|
||||
}
|
||||
|
||||
//document.UpdateDocumentFields();
|
||||
//document.UpdateAlternateChunks();
|
||||
@@ -451,6 +455,32 @@ namespace DOCGEN.Klassen
|
||||
}
|
||||
}
|
||||
|
||||
public void insert_Logo(WordDocument document, clsDocData docData)
|
||||
{
|
||||
IWSection section = document.Sections[0];
|
||||
IWParagraph paragraph = section.HeadersFooters.Header.AddParagraph();
|
||||
System.Drawing.Image image = System.Drawing.Image.FromFile(@"E:\Software-Projekte\OnDoc\Images\tkb_logo_4c_u.jpg");
|
||||
paragraph.AppendPicture(image);
|
||||
|
||||
////Get the Word document section.
|
||||
//IWSection section = document.Sections[0];
|
||||
////Add a paragraph to the header.
|
||||
//IWParagraph paragraph = section.HeadersFooters.Header.AddParagraph();
|
||||
//// Get the image stream.
|
||||
//FileStream imageStream = new FileStream(@"../../../Data/Logo.jpg", FileMode.Open, FileAccess.Read);
|
||||
////Append the picture to the created paragraph.
|
||||
//IWPicture picture = paragraph.AppendPicture(imageStream);
|
||||
////Set the picture properties.
|
||||
//picture.TextWrappingStyle = TextWrappingStyle.InFrontOfText;
|
||||
//picture.VerticalOrigin = VerticalOrigin.Margin;
|
||||
//picture.VerticalPosition = -45;
|
||||
//picture.HorizontalOrigin = HorizontalOrigin.Column;
|
||||
//picture.HorizontalPosition = 263.5f;
|
||||
//picture.WidthScale = 20;
|
||||
//picture.HeightScale = 15;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Word to PDF-Konverter</summary>
|
||||
/// <remarks>Das sind die Remarks</remarks>
|
||||
/// <param name="dokument">Base64-Dokument</param>
|
||||
|
||||
Reference in New Issue
Block a user