update 20250326

This commit is contained in:
Stefan Hutter
2025-03-26 20:46:46 +01:00
parent c767e2ed82
commit e0d3dbbbff
460 changed files with 122504 additions and 1125 deletions

View File

@@ -21,6 +21,8 @@ using Syncfusion.DocIO;
using Syncfusion.Pdf;
using System.IO;
using Syncfusion.Compression.Zip;
using Syncfusion.Pdf.Graphics;
using Syncfusion.Pdf.Parsing;
namespace DOCGEN
{
@@ -84,7 +86,37 @@ namespace DOCGEN
{
return "";
}
public string geneate_dummy_pdf(string inhalt)
{
using (PdfDocument document = new PdfDocument())
{
// Set the page size.
document.PageSettings.Size = PdfPageSize.A4;
//Add a page to the document.
PdfPage page = document.Pages.Add();
//Create PDF graphics for the page.
PdfGraphics graphics = page.Graphics;
//create the PDF font.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
//Draw the text.
graphics.DrawString(inhalt, font, PdfBrushes.Black, new System.Drawing.PointF(0, 0));
// Write the PDF document to file
MemoryStream outputStream = new MemoryStream();
document.Save(outputStream);
byte[] bytes;
bytes = outputStream.ToArray();
outputStream.Close();
outputStream = null;
document.Close();
return Convert.ToBase64String(bytes);
}
}
public string generate_serienbrief(string vorlage,serienbrief sb, string dokumentid, string resturi, string apikey)
{
SyncFWord sfword = new SyncFWord(resturi,apikey);