This commit is contained in:
2025-04-03 16:41:10 +00:00
parent 21650f1181
commit a932d68f86
34 changed files with 1265 additions and 2987 deletions

View File

@ -1,4 +1,4 @@
import { PDFDocument } from 'pdf-lib';
import { PDFDocument, AFRelationship } from 'pdf-lib';
import type { IPdf } from '../../interfaces/common.js';
/**
@ -31,8 +31,11 @@ export class PDFEmbedder {
// Use pdf-lib's .attach() to embed the XML
pdfDoc.attach(xmlBuffer, filename, {
mimeType: 'application/xml',
mimeType: 'text/xml',
description: description,
creationDate: new Date(),
modificationDate: new Date(),
afRelationship: AFRelationship.Alternative,
});
// Save the modified PDF