working
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user