Ensure that the various layers always get the correct initial size (issue 15795)
This commit is contained in:
parent
3155e2a63b
commit
527258c316
@ -195,6 +195,13 @@ class PDFPageView {
|
|||||||
PDFJSDev.test("!PRODUCTION || GENERIC")) &&
|
PDFJSDev.test("!PRODUCTION || GENERIC")) &&
|
||||||
this._isStandalone
|
this._isStandalone
|
||||||
) {
|
) {
|
||||||
|
// Ensure that the various layers always get the correct initial size,
|
||||||
|
// see issue 15795.
|
||||||
|
docStyle.setProperty(
|
||||||
|
"--scale-factor",
|
||||||
|
this.scale * PixelsPerInch.PDF_TO_CSS_UNITS
|
||||||
|
);
|
||||||
|
|
||||||
const { optionalContentConfigPromise } = options;
|
const { optionalContentConfigPromise } = options;
|
||||||
if (optionalContentConfigPromise) {
|
if (optionalContentConfigPromise) {
|
||||||
// Ensure that the thumbnails always display the *initial* document
|
// Ensure that the thumbnails always display the *initial* document
|
||||||
|
@ -747,6 +747,10 @@ class PDFViewer {
|
|||||||
const viewport = firstPdfPage.getViewport({
|
const viewport = firstPdfPage.getViewport({
|
||||||
scale: scale * PixelsPerInch.PDF_TO_CSS_UNITS,
|
scale: scale * PixelsPerInch.PDF_TO_CSS_UNITS,
|
||||||
});
|
});
|
||||||
|
// Ensure that the various layers always get the correct initial size,
|
||||||
|
// see issue 15795.
|
||||||
|
docStyle.setProperty("--scale-factor", viewport.scale);
|
||||||
|
|
||||||
const textLayerFactory =
|
const textLayerFactory =
|
||||||
textLayerMode !== TextLayerMode.DISABLE && !isPureXfa ? this : null;
|
textLayerMode !== TextLayerMode.DISABLE && !isPureXfa ? this : null;
|
||||||
const annotationLayerFactory =
|
const annotationLayerFactory =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user