update 20241217
This commit is contained in:
@@ -285,7 +285,7 @@ namespace DOCGEN
|
||||
}
|
||||
|
||||
|
||||
public string Convert_Word_To_PDF(string document, DataTable pdfparameters = null)
|
||||
public string Convert_Word_To_PDF(string document, DataTable pdfparameters = null, bool useseettings = false)
|
||||
{
|
||||
|
||||
//Dokument erstellen
|
||||
@@ -298,10 +298,12 @@ namespace DOCGEN
|
||||
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;
|
||||
|
||||
if (useseettings)
|
||||
{
|
||||
converter.Settings.UpdateDocumentFields = true;
|
||||
converter.Settings.EnableAlternateChunks = true;
|
||||
converter.Settings.AutoDetectComplexScript = true;
|
||||
}
|
||||
//Converts Word document into PDF document
|
||||
using (PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument))
|
||||
{
|
||||
@@ -457,13 +459,16 @@ namespace DOCGEN
|
||||
|
||||
//Initialize ExcelToPdfConverter
|
||||
ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook);
|
||||
ExcelToPdfConverterSettings settings = new ExcelToPdfConverterSettings();
|
||||
settings.EmbedFonts = true;
|
||||
|
||||
|
||||
|
||||
//Initialize PDF document
|
||||
PdfDocument pdfDocument = new PdfDocument();
|
||||
|
||||
//Convert Excel document into PDF document
|
||||
pdfDocument = converter.Convert();
|
||||
pdfDocument = converter.Convert(settings);
|
||||
|
||||
//Save the converted PDF document
|
||||
|
||||
|
||||
Reference in New Issue
Block a user