update 20260326
This commit is contained in:
@@ -1464,7 +1464,20 @@ namespace DOCGEN.Klassen
|
||||
bool hassignature = false;
|
||||
foreach (attribute apivalue in docdata.APIValues)
|
||||
{
|
||||
|
||||
// apivalue.Value = apivalue.Value.Replace("\r\n", "\n").Replace("\r", "\n").Replace("\n", Environment.NewLine);
|
||||
// if (apivalue.Value.Contains("\n"))
|
||||
// {
|
||||
// int i = 0;
|
||||
// }
|
||||
//if (apivalue.Value.Contains("<pdel;"))
|
||||
//{
|
||||
// apivalue.Value = apivalue.Value.Replace("\n", Environment.NewLine);
|
||||
//}
|
||||
if (apivalue.Value.Contains("<ol>"))
|
||||
{
|
||||
apivalue.Value = apivalue.Value.Replace("<ol>", "");
|
||||
apivalue.Value = apivalue.Value.Replace("\n", Environment.NewLine);
|
||||
}
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(apivalue.Type)) { apivalue.Type = ""; }
|
||||
@@ -1503,6 +1516,7 @@ namespace DOCGEN.Klassen
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (apivalue.Value.Contains("</i>"))
|
||||
{
|
||||
string leftpart = apivalue.Value.Substring(0, apivalue.Value.IndexOf("<i>"));
|
||||
@@ -1522,12 +1536,14 @@ namespace DOCGEN.Klassen
|
||||
{
|
||||
if (!apivalue.Value.Contains("<pdel;"))
|
||||
{
|
||||
apivalue.Value=apivalue.Value.Replace("\n", Environment.NewLine);
|
||||
BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document);
|
||||
bookmarkNavigator.MoveToBookmark(apivalue.Tag);
|
||||
bookmarkNavigator.ReplaceBookmarkContent(apivalue.Value, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
string[] delparams = apivalue.Value.Split(new string[] { "<pdel;" }, StringSplitOptions.None);
|
||||
string[] delparam = delparams[1].ToString().Split(';');
|
||||
int delstart = Convert.ToInt32(delparam[0].ToString().Substring(0, delparam[0].IndexOf(">")));
|
||||
@@ -1563,7 +1579,7 @@ namespace DOCGEN.Klassen
|
||||
if (fullText.Contains("<PageBreak>"))
|
||||
{
|
||||
//paragraph.Text = "";
|
||||
|
||||
fullText = fullText.Replace("<PageBreak>", "");
|
||||
paragraph.AppendBreak(BreakType.PageBreak);
|
||||
}
|
||||
if (fullText.Contains("<li;"))
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,33 +1,34 @@
|
||||
using Database;
|
||||
using DOCGEN.Klassen;
|
||||
using Helper;
|
||||
using Model;
|
||||
using OnDocOffice;
|
||||
using SkiaSharp;
|
||||
using Syncfusion.DocIO;
|
||||
using Syncfusion.DocIO.DLS;
|
||||
using Syncfusion.ExcelToPdfConverter;
|
||||
using Syncfusion.Pdf;
|
||||
using Syncfusion.Pdf.Parsing;
|
||||
using Syncfusion.XlsIO;
|
||||
using Syncfusion.XlsIO.Parser.Biff_Records;
|
||||
using System;
|
||||
using System.Buffers.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Syncfusion.DocIO;
|
||||
using Syncfusion.Pdf;
|
||||
using Syncfusion.XlsIO;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
using Syncfusion.Pdf.Parsing;
|
||||
using System.Xml.Linq;
|
||||
using Model;
|
||||
using SkiaSharp;
|
||||
using System.Web;
|
||||
using System.Net;
|
||||
using System.Security.Policy;
|
||||
using DOCGEN.Klassen;
|
||||
using System.Data;
|
||||
using Helper;
|
||||
using Syncfusion.XlsIO.Parser.Biff_Records;
|
||||
using System.Buffers.Text;
|
||||
using Syncfusion.ExcelToPdfConverter;
|
||||
using OnDocOffice;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Xml.Linq;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
using static System.Net.WebRequestMethods;
|
||||
|
||||
|
||||
namespace DOCGEN
|
||||
@@ -356,7 +357,7 @@ namespace DOCGEN
|
||||
|
||||
public string Convert_Word_To_PDF(string document, DataTable pdfparameters = null, bool useseettings = false , bool updatefields=true)
|
||||
{
|
||||
|
||||
|
||||
|
||||
//Dokument erstellen
|
||||
var streamword = new MemoryStream(Convert.FromBase64String(document));
|
||||
@@ -373,6 +374,7 @@ namespace DOCGEN
|
||||
using (Syncfusion.DocToPDFConverter.DocToPDFConverter converter = new Syncfusion.DocToPDFConverter.DocToPDFConverter())
|
||||
{
|
||||
converter.Settings.EmbedFonts = true;
|
||||
// converter.Settings.OptimizeIdenticalImages = false;
|
||||
if (useseettings)
|
||||
{
|
||||
converter.Settings.UpdateDocumentFields = updatefields;
|
||||
@@ -381,6 +383,7 @@ namespace DOCGEN
|
||||
converter.Settings.ImageResolution = 640;
|
||||
converter.Settings.ImageQuality = 100;
|
||||
converter.Settings.PreserveFormFields = true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -390,6 +393,7 @@ namespace DOCGEN
|
||||
converter.Settings.ImageResolution = 640;
|
||||
converter.Settings.ImageQuality = 100;
|
||||
|
||||
|
||||
//foreach (WSection section in wordDocument.Sections)
|
||||
//{
|
||||
// section.PageSetup.PageSize = PageSize.A4;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user