update 20241217

This commit is contained in:
Stefan Hutter
2024-12-17 20:48:07 +01:00
parent 8f74cec1ab
commit 7e891afc23
108 changed files with 686 additions and 150 deletions

View File

@@ -17,6 +17,9 @@ using System.Runtime.Serialization;
using System.Xml.Linq;
using NLog.LayoutRenderers;
using System.Configuration;
using Syncfusion.DocIO;
using Syncfusion.Pdf;
using System.IO;
namespace DOCGEN
{
@@ -115,5 +118,30 @@ namespace DOCGEN
sfword = null;
return dok.dokument;
}
//public void createpdf(string filename)
//{
// WordDocument document = new WordDocument(filename, FormatType.Automatic);
// CompatibilityMode compatibilityMode = document.Settings.CompatibilityMode;
// //document.UpdateDocumentFields();
// //document.UpdateDocumentFields();
// //TextSelection textSelection = document.Find("den Kunden", false, true);
// //WTextRange textRange = textSelection.GetAsOneRange();
// //Modifies the text
// //textRange.Text = "Replaced text";
// using (Syncfusion.DocToPDFConverter.DocToPDFConverter converter = new Syncfusion.DocToPDFConverter.DocToPDFConverter())
// {
// converter.Settings.EmbedFonts = true;
// //converter.Settings.UpdateDocumentFields = true;
// //converter.Settings.EnableAlternateChunks = true;
// //converter.Settings.AutoDetectComplexScript = true;
// //Converts Word document into PDF document
// using (PdfDocument pdfDocument = converter.ConvertToPDF(document))
// {
// pdfDocument.Save(filename + ".pdf");
// }
// };
//}
}
}