Skip to content

Commit 22cb308

Browse files
Merge pull request #19887 from Snuffleupagus/serializeXfaData-simplify
Simplify the `serializeXfaData` method and related code
2 parents bd81d39 + b531720 commit 22cb308

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/core/document.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,7 @@ class PDFDocument {
14081408
this.xfaFactory.appendFonts(pdfFonts, reallyMissingFonts);
14091409
}
14101410

1411-
async serializeXfaData(annotationStorage) {
1411+
serializeXfaData(annotationStorage) {
14121412
return this.xfaFactory
14131413
? this.xfaFactory.serializeData(annotationStorage)
14141414
: null;

src/core/pdf_manager.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,6 @@ class BasePdfManager {
123123
return this.pdfDocument.loadXfaImages();
124124
}
125125

126-
serializeXfaData(annotationStorage) {
127-
return this.pdfDocument.serializeXfaData(annotationStorage);
128-
}
129-
130126
cleanup(manuallyTriggered = false) {
131127
return this.pdfDocument.cleanup(manuallyTriggered);
132128
}

src/core/worker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,9 @@ class WorkerMessageHandler {
617617
}
618618

619619
if (isPureXfa) {
620-
promises.push(pdfManager.serializeXfaData(annotationStorage));
620+
promises.push(
621+
pdfManager.ensureDoc("serializeXfaData", [annotationStorage])
622+
);
621623
} else {
622624
for (let pageIndex = 0; pageIndex < numPages; pageIndex++) {
623625
promises.push(

0 commit comments

Comments
 (0)