Update PDF metadata handling in PdfResultPackageService
Introduce functionality to remove and replace metadata in the resulting PDF document. After loading the document with `PdfDocumentProcessor`, the metadata fields (`Author`, `Creator`, `Producer`, `Title`, `Subject`, and `Keywords`) are cleared or replaced with values indicating the document was processed by the "DXApp" system. This ensures proper attribution and removes any association with the original document creator.
This commit is contained in:
@@ -60,6 +60,14 @@ public class PdfResultPackageService(
|
||||
using var processor = new PdfDocumentProcessor();
|
||||
processor.LoadDocument(convertedStream);
|
||||
|
||||
// Metadaten des Originals entfernen → Result-PDF gehört uns, nicht dem Ersteller
|
||||
processor.Document.Author = "DXApp Verarbeitungssystem";
|
||||
processor.Document.Creator = "DXApp";
|
||||
processor.Document.Producer = "DXApp";
|
||||
processor.Document.Title = string.Empty;
|
||||
processor.Document.Subject = string.Empty;
|
||||
processor.Document.Keywords = string.Empty;
|
||||
|
||||
processor.AttachFile(new PdfFileAttachment
|
||||
{
|
||||
FileName = Path.GetFileName(reportPath),
|
||||
|
||||
Reference in New Issue
Block a user