mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #13207 from Snuffleupagus/api-AnnotationStorage-params
[api-minor] Remove the manual passing of an `AnnotationStorage`-instance when calling various API-method
This commit is contained in:
commit
b0473eb353
5 changed files with 54 additions and 39 deletions
|
@ -998,9 +998,7 @@ const PDFViewerApplication = {
|
|||
try {
|
||||
this._ensureDownloadComplete();
|
||||
|
||||
const data = await this.pdfDocument.saveDocument(
|
||||
this.pdfDocument.annotationStorage
|
||||
);
|
||||
const data = await this.pdfDocument.saveDocument();
|
||||
const blob = new Blob([data], { type: "application/pdf" });
|
||||
|
||||
await this.downloadManager.download(blob, url, filename, sourceEventType);
|
||||
|
|
|
@ -66,7 +66,7 @@ function composePage(
|
|||
transform: [PRINT_UNITS, 0, 0, PRINT_UNITS, 0, 0],
|
||||
viewport: pdfPage.getViewport({ scale: 1, rotation: size.rotation }),
|
||||
intent: "print",
|
||||
annotationStorage: pdfDocument.annotationStorage,
|
||||
includeAnnotationStorage: true,
|
||||
optionalContentConfigPromise,
|
||||
};
|
||||
currentRenderTask = thisRenderTask = pdfPage.render(renderContext);
|
||||
|
|
|
@ -48,7 +48,7 @@ function renderPage(
|
|||
transform: [PRINT_UNITS, 0, 0, PRINT_UNITS, 0, 0],
|
||||
viewport: pdfPage.getViewport({ scale: 1, rotation: size.rotation }),
|
||||
intent: "print",
|
||||
annotationStorage: pdfDocument.annotationStorage,
|
||||
includeAnnotationStorage: true,
|
||||
optionalContentConfigPromise,
|
||||
};
|
||||
return pdfPage.render(renderContext).promise;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue