update 20250727
This commit is contained in:
@@ -10,6 +10,7 @@ using Model;
|
||||
using Syncfusion.DocIO.DLS;
|
||||
using Syncfusion.XlsIO;
|
||||
using Syncfusion.XlsIO.Implementation.XmlSerialization;
|
||||
using System.Globalization;
|
||||
|
||||
namespace DOCGEN.Klassen
|
||||
{
|
||||
|
||||
@@ -504,10 +504,14 @@ namespace DOCGEN.Klassen
|
||||
{
|
||||
foreach (attribute apivalue in docdata.APIValues)
|
||||
{
|
||||
BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document);
|
||||
bookmarkNavigator.MoveToBookmark(apivalue.Tag);
|
||||
//bookmarkNavigator.InsertText(dv.Value.ToString());
|
||||
bookmarkNavigator.ReplaceBookmarkContent(apivalue.Value, true);
|
||||
try
|
||||
{
|
||||
BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document);
|
||||
bookmarkNavigator.MoveToBookmark(apivalue.Tag);
|
||||
//bookmarkNavigator.InsertText(dv.Value.ToString());
|
||||
bookmarkNavigator.ReplaceBookmarkContent(apivalue.Value, true);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
@@ -1225,8 +1229,10 @@ namespace DOCGEN.Klassen
|
||||
{
|
||||
IWSection section = document.Sections[0];
|
||||
IWParagraph paragraph = section.HeadersFooters.Header.AddParagraph();
|
||||
|
||||
byte[] imageBytes = Convert.FromBase64String(get_image(4,-1,-1));
|
||||
|
||||
string b64 = Newtonsoft.Json.JsonConvert.DeserializeObject<string>(get_image(4, -1, 0));
|
||||
|
||||
byte[] imageBytes = Convert.FromBase64String(b64);
|
||||
using (var ms = new MemoryStream(imageBytes, 0, imageBytes.Length))
|
||||
{
|
||||
System.Drawing.Image image = System.Drawing.Image.FromStream(ms);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -28,6 +28,8 @@ using Syncfusion.XlsIO.Parser.Biff_Records;
|
||||
using System.Buffers.Text;
|
||||
using Syncfusion.ExcelToPdfConverter;
|
||||
using OnDocOffice;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
|
||||
|
||||
namespace DOCGEN
|
||||
@@ -349,6 +351,7 @@ namespace DOCGEN
|
||||
var streamword = new MemoryStream(Convert.FromBase64String(document));
|
||||
WordDocument wordDocument = new WordDocument(streamword, Syncfusion.DocIO.FormatType.Automatic);
|
||||
wordDocument.Properties.Hyphenation.AutoHyphenation = true;
|
||||
wordDocument.UpdateDocumentFields();
|
||||
//FileStream dictornyrystream = new FileStream(@"E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\hyph_de_CH.dic", FileMode.Open);
|
||||
//Hyphenator.Dictionaries.Add("de-CH", dictornyrystream);
|
||||
|
||||
@@ -361,7 +364,7 @@ namespace DOCGEN
|
||||
converter.Settings.EmbedFonts = true;
|
||||
if (useseettings)
|
||||
{
|
||||
converter.Settings.UpdateDocumentFields = false;
|
||||
converter.Settings.UpdateDocumentFields = true;
|
||||
converter.Settings.EnableAlternateChunks = true;
|
||||
converter.Settings.AutoDetectComplexScript = true;
|
||||
converter.Settings.ImageResolution = 640;
|
||||
@@ -369,7 +372,7 @@ namespace DOCGEN
|
||||
}
|
||||
else
|
||||
{
|
||||
converter.Settings.UpdateDocumentFields = false;
|
||||
converter.Settings.UpdateDocumentFields = true;
|
||||
converter.Settings.EnableAlternateChunks = true;
|
||||
converter.Settings.AutoDetectComplexScript = true;
|
||||
converter.Settings.ImageResolution = 96;
|
||||
@@ -532,10 +535,10 @@ namespace DOCGEN
|
||||
//Initialize ExcelToPdfConverter
|
||||
ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook);
|
||||
ExcelToPdfConverterSettings settings = new ExcelToPdfConverterSettings();
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-CH");
|
||||
settings.EmbedFonts = true;
|
||||
|
||||
|
||||
|
||||
//Initialize PDF document
|
||||
PdfDocument pdfDocument = new PdfDocument();
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user