update 20241217
This commit is contained in:
@@ -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");
|
||||
// }
|
||||
// };
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user