Merge pull request #20803 from calixteman/fix_saving

Fix downloading the current pdf
This commit is contained in:
calixteman 2026-03-05 15:01:08 +01:00 committed by GitHub
commit 9f8f303b1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1316,9 +1316,10 @@ const PDFViewerApplication = {
const { classList } = this.appConfig.appContainer;
classList.add("wait");
const structuralChanges = this.pdfThumbnailViewer?.getStructuralChanges();
if (structuralChanges) {
await this.onSavePages({ data: structuralChanges });
if (this.pdfThumbnailViewer?.hasStructuralChanges()) {
await this.onSavePages({
data: this.pdfThumbnailViewer.getStructuralChanges(),
});
} else {
await (this.pdfDocument?.annotationStorage.size > 0
? this.save()