@syncfusion/ej2-pdfviewer 17.3.59-4568 → 17.3.60-4568

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9677,8 +9677,14 @@ class TextMarkupAnnotation {
9677
9677
  }
9678
9678
  annotCanvas.style.width = '';
9679
9679
  annotCanvas.style.height = '';
9680
- annotCanvas.width = this.pdfViewerBase.pageSize[pageNumber].width * this.pdfViewerBase.getZoomFactor();
9681
- annotCanvas.height = this.pdfViewerBase.pageSize[pageNumber].height * this.pdfViewerBase.getZoomFactor();
9680
+ if (this.pdfViewer.restrictZoomRequest) {
9681
+ annotCanvas.style.width = this.pdfViewerBase.pageSize[pageNumber].width * this.pdfViewerBase.getZoomFactor() + 'px';
9682
+ annotCanvas.style.height = this.pdfViewerBase.pageSize[pageNumber].height * this.pdfViewerBase.getZoomFactor() + 'px';
9683
+ }
9684
+ else {
9685
+ annotCanvas.width = this.pdfViewerBase.pageSize[pageNumber].width * this.pdfViewerBase.getZoomFactor();
9686
+ annotCanvas.height = this.pdfViewerBase.pageSize[pageNumber].height * this.pdfViewerBase.getZoomFactor();
9687
+ }
9682
9688
  this.renderTextMarkupAnnotations(null, pageNumber, annotCanvas, this.pdfViewerBase.getZoomFactor());
9683
9689
  }
9684
9690
  }
@@ -22164,6 +22170,9 @@ class PdfViewerBase {
22164
22170
  // tslint:disable-next-line
22165
22171
  getStoredData(pageIndex) {
22166
22172
  let zoomFactor = this.retrieveCurrentZoomFactor();
22173
+ if (this.pdfViewer.restrictZoomRequest && !this.pdfViewer.tileRenderingSettings.enableTileRendering) {
22174
+ zoomFactor = 1;
22175
+ }
22167
22176
  // tslint:disable-next-line
22168
22177
  let storedData = this.getWindowSessionStorage(pageIndex, zoomFactor) ? this.getWindowSessionStorage(pageIndex, zoomFactor) : this.getPinchZoomPage(pageIndex);
22169
22178
  // tslint:disable-next-line
@@ -26821,9 +26830,16 @@ class Magnification {
26821
26830
  let pageNumber = parseInt(pageDivs[i].id.split('_pageCanvas_')[1]);
26822
26831
  let pageWidth = this.pdfViewerBase.pageSize[pageNumber].width;
26823
26832
  if ((viewPortWidth < pageWidth) && this.pdfViewer.tileRenderingSettings.enableTileRendering) {
26824
- pageDivs[i].width = pageWidth * this.pdfViewerBase.getZoomFactor();
26825
- // tslint:disable-next-line:max-line-length
26826
- pageDivs[i].height = this.pdfViewerBase.pageSize[pageNumber].height * this.pdfViewerBase.getZoomFactor();
26833
+ if (this.pdfViewer.restrictZoomRequest) {
26834
+ pageDivs[i].style.width = pageWidth * this.pdfViewerBase.getZoomFactor() + 'px';
26835
+ // eslint-disable-next-line max-len
26836
+ pageDivs[i].style.height = this.pdfViewerBase.pageSize[pageNumber].height * this.pdfViewerBase.getZoomFactor() + 'px';
26837
+ }
26838
+ else {
26839
+ pageDivs[i].width = pageWidth * this.pdfViewerBase.getZoomFactor();
26840
+ // eslint-disable-next-line max-len
26841
+ pageDivs[i].height = this.pdfViewerBase.pageSize[pageNumber].height * this.pdfViewerBase.getZoomFactor();
26842
+ }
26827
26843
  }
26828
26844
  }
26829
26845
  if (this.pdfViewerBase.textLayer) {
@@ -26925,11 +26941,11 @@ class Magnification {
26925
26941
  let canvas = this.pdfViewerBase.getElement('_pageCanvas_' + i);
26926
26942
  let width = this.pdfViewerBase.pageSize[i].width * this.zoomFactor;
26927
26943
  let height = this.pdfViewerBase.pageSize[i].height * this.zoomFactor;
26928
- if (canvas) {
26944
+ if (canvas && !this.pdfViewer.restrictZoomRequest) {
26929
26945
  // tslint:disable-next-line:max-line-length
26930
26946
  this.pdfViewerBase.renderPageCanvas(this.pdfViewerBase.getElement('_pageDiv_' + i), width, height, i, 'none');
26931
26947
  }
26932
- else {
26948
+ else if (!this.pdfViewer.restrictZoomRequest) {
26933
26949
  this.pdfViewerBase.renderPageElement(i);
26934
26950
  }
26935
26951
  }
@@ -36730,6 +36746,9 @@ __decorate$2([
36730
36746
  __decorate$2([
36731
36747
  Property(true)
36732
36748
  ], PdfViewer.prototype, "enableHandwrittenSignature", void 0);
36749
+ __decorate$2([
36750
+ Property(false)
36751
+ ], PdfViewer.prototype, "restrictZoomRequest", void 0);
36733
36752
  __decorate$2([
36734
36753
  Property('CurrentTab')
36735
36754
  ], PdfViewer.prototype, "hyperlinkOpenState", void 0);