mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-13 02:25:47 +02:00
Merge pull request #20803 from calixteman/fix_saving
Fix downloading the current pdf
This commit is contained in:
commit
9f8f303b1f
@ -1316,9 +1316,10 @@ const PDFViewerApplication = {
|
|||||||
const { classList } = this.appConfig.appContainer;
|
const { classList } = this.appConfig.appContainer;
|
||||||
classList.add("wait");
|
classList.add("wait");
|
||||||
|
|
||||||
const structuralChanges = this.pdfThumbnailViewer?.getStructuralChanges();
|
if (this.pdfThumbnailViewer?.hasStructuralChanges()) {
|
||||||
if (structuralChanges) {
|
await this.onSavePages({
|
||||||
await this.onSavePages({ data: structuralChanges });
|
data: this.pdfThumbnailViewer.getStructuralChanges(),
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
await (this.pdfDocument?.annotationStorage.size > 0
|
await (this.pdfDocument?.annotationStorage.size > 0
|
||||||
? this.save()
|
? this.save()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user