mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
[api-minor] Remove SVG-rendering from the viewer (PR 15173 follow-up)
This commit is contained in:
parent
b135dadb17
commit
c2f1e65cc3
5 changed files with 14 additions and 159 deletions
18
web/app.js
18
web/app.js
|
@ -27,7 +27,6 @@ import {
|
|||
normalizeWheelEventDirection,
|
||||
parseQueryString,
|
||||
ProgressBar,
|
||||
RendererType,
|
||||
RenderingStates,
|
||||
ScrollMode,
|
||||
SidebarView,
|
||||
|
@ -512,11 +511,6 @@ const PDFViewerApplication = {
|
|||
findController,
|
||||
scriptingManager:
|
||||
AppOptions.get("enableScripting") && pdfScriptingManager,
|
||||
renderer:
|
||||
typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("!PRODUCTION || GENERIC")
|
||||
? AppOptions.get("renderer")
|
||||
: null,
|
||||
l10n: this.l10n,
|
||||
textLayerMode: AppOptions.get("textLayerMode"),
|
||||
annotationMode: AppOptions.get("annotationMode"),
|
||||
|
@ -1714,17 +1708,7 @@ const PDFViewerApplication = {
|
|||
this.pdfViewer.cleanup();
|
||||
this.pdfThumbnailViewer?.cleanup();
|
||||
|
||||
if (
|
||||
typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("!PRODUCTION || GENERIC")
|
||||
) {
|
||||
// We don't want to remove fonts used by active page SVGs.
|
||||
this.pdfDocument.cleanup(
|
||||
/* keepLoadedFonts = */ this.pdfViewer.renderer === RendererType.SVG
|
||||
);
|
||||
} else {
|
||||
this.pdfDocument.cleanup();
|
||||
}
|
||||
this.pdfDocument.cleanup();
|
||||
},
|
||||
|
||||
forceRendering() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue