Merge pull request #19887 from Snuffleupagus/serializeXfaData-simplify

Simplify the `serializeXfaData` method and related code
This commit is contained in:
Tim van der Meij 2025-05-04 13:38:01 +02:00 committed by GitHub
commit 22cb3080ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 6 deletions

View File

@ -1408,7 +1408,7 @@ class PDFDocument {
this.xfaFactory.appendFonts(pdfFonts, reallyMissingFonts);
}
async serializeXfaData(annotationStorage) {
serializeXfaData(annotationStorage) {
return this.xfaFactory
? this.xfaFactory.serializeData(annotationStorage)
: null;

View File

@ -123,10 +123,6 @@ class BasePdfManager {
return this.pdfDocument.loadXfaImages();
}
serializeXfaData(annotationStorage) {
return this.pdfDocument.serializeXfaData(annotationStorage);
}
cleanup(manuallyTriggered = false) {
return this.pdfDocument.cleanup(manuallyTriggered);
}

View File

@ -617,7 +617,9 @@ class WorkerMessageHandler {
}
if (isPureXfa) {
promises.push(pdfManager.serializeXfaData(annotationStorage));
promises.push(
pdfManager.ensureDoc("serializeXfaData", [annotationStorage])
);
} else {
for (let pageIndex = 0; pageIndex < numPages; pageIndex++) {
promises.push(