@syncfusion/ej2-pdfviewer
Advanced tools
Comparing version 17.2.47 to 17.2.48-beta
/*! | ||
* filename: index.d.ts | ||
* version : 17.2.47 | ||
* version : 17.2.48-beta | ||
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"_from": "@syncfusion/ej2-pdfviewer@*", | ||
"_id": "@syncfusion/ej2-pdfviewer@17.2.46", | ||
"_id": "@syncfusion/ej2-pdfviewer@17.2.34", | ||
"_inBundle": false, | ||
"_integrity": "sha512-mQNh67SOTIUn7HeCwUq7p9aL7vdQ3a+q58PFLC/87d6+goLAsRyRVjB8zy0yFu//FLb2CembUvbihSYeLHADHg==", | ||
"_integrity": "sha512-aaxP8Pj0QOkvKGXoZVjACPlUb9Iwy+uO0m0HQV09ZaD0zc7Z23L4pVfzDfwvJmTqxcUQ+BglOD37wvaBmzmkAg==", | ||
"_location": "/@syncfusion/ej2-pdfviewer", | ||
@@ -26,6 +26,6 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-pdfviewer/-/ej2-pdfviewer-17.2.46.tgz", | ||
"_shasum": "888f4d6e9cc2596196a133ed25ae1751be9edb81", | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-production/@syncfusion/ej2-pdfviewer/-/ej2-pdfviewer-17.2.34.tgz", | ||
"_shasum": "43654a62002b259a4db24e281793d844db9834d2", | ||
"_spec": "@syncfusion/ej2-pdfviewer@*", | ||
"_where": "/jenkins/workspace/ation_hotfix_17.2.0.34_Vol2-DDPJ6C2YEWTWLLKKNA7AG2JBE6DYTCTNGMHGORWGAYAVCL6L7OLQ/packages/included", | ||
"_where": "/jenkins/workspace/ation_hotfix_16.4.0.42_Vol4-CJVRBFC7Z7RSISPRJNEMNQSRMCB6XTG67IJD6R2DVNXFIKQEITTQ/packages/included", | ||
"author": { | ||
@@ -39,15 +39,15 @@ "name": "Syncfusion Inc." | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~17.2.47", | ||
"@syncfusion/ej2-buttons": "~17.2.47", | ||
"@syncfusion/ej2-calendars": "~17.2.47", | ||
"@syncfusion/ej2-data": "~17.2.47", | ||
"@syncfusion/ej2-drawings": "~17.2.47", | ||
"@syncfusion/ej2-dropdowns": "~17.2.47", | ||
"@syncfusion/ej2-inplace-editor": "~17.2.47", | ||
"@syncfusion/ej2-inputs": "~17.2.47", | ||
"@syncfusion/ej2-lists": "~17.2.47", | ||
"@syncfusion/ej2-navigations": "~17.2.47", | ||
"@syncfusion/ej2-notifications": "~17.2.47", | ||
"@syncfusion/ej2-popups": "~17.2.47", | ||
"@syncfusion/ej2-richtexteditor": "~17.2.47" | ||
"@syncfusion/ej2-base": "17.2.48-beta", | ||
"@syncfusion/ej2-buttons": "17.2.48-beta", | ||
"@syncfusion/ej2-calendars": "17.2.48-beta", | ||
"@syncfusion/ej2-data": "17.2.48-beta", | ||
"@syncfusion/ej2-drawings": "17.2.48-beta", | ||
"@syncfusion/ej2-dropdowns": "17.2.48-beta", | ||
"@syncfusion/ej2-inplace-editor": "17.2.48-beta", | ||
"@syncfusion/ej2-inputs": "17.2.48-beta", | ||
"@syncfusion/ej2-lists": "17.2.48-beta", | ||
"@syncfusion/ej2-navigations": "17.2.48-beta", | ||
"@syncfusion/ej2-notifications": "17.2.48-beta", | ||
"@syncfusion/ej2-popups": "17.2.48-beta", | ||
"@syncfusion/ej2-richtexteditor": "17.2.48-beta" | ||
}, | ||
@@ -78,4 +78,4 @@ "deprecated": false, | ||
"typings": "index.d.ts", | ||
"version": "17.2.47", | ||
"version": "17.2.48-beta", | ||
"sideEffects": false | ||
} |
@@ -324,2 +324,3 @@ import { PdfViewer, TextLayer, ContextMenu } from '../index'; | ||
private saveDocumentHashData; | ||
private saveFormfieldsData; | ||
private updateWaitingPopup; | ||
@@ -326,0 +327,0 @@ private createWaitingPopup; |
@@ -76,3 +76,3 @@ import { createElement, isNullOrUndefined, Browser } from '@syncfusion/ej2-base'; | ||
// tslint:disable-next-line:max-line-length | ||
if (this.pdfViewer.textSelectionModule && this.pdfViewer.enableTextSelection && !this.pdfViewerBase.isTextSelectionDisabled) { | ||
if (this.pdfViewer.textSelectionModule && this.pdfViewer.enableTextSelection && !this.pdfViewerBase.isTextSelectionDisabled && textDiv.className !== 'e-pdfviewer-formFields') { | ||
textDiv.classList.add('e-pv-cursor'); | ||
@@ -360,7 +360,9 @@ } | ||
var textDiv = childNodes[j]; | ||
var textContent = textDiv.textContent; | ||
// tslint:disable-next-line:max-line-length | ||
if (textDiv.childNodes.length > 1 || textDiv.childNodes.length === 1 && (textDiv.childNodes[0].tagName === 'SPAN')) { | ||
textDiv.textContent = ''; | ||
textDiv.textContent = textContent; | ||
if (textDiv.className !== 'e-pdfviewer-formFields') { | ||
var textContent = textDiv.textContent; | ||
// tslint:disable-next-line:max-line-length | ||
if (textDiv.childNodes.length > 1 || textDiv.childNodes.length === 1 && (textDiv.childNodes[0].tagName === 'SPAN')) { | ||
textDiv.textContent = ''; | ||
textDiv.textContent = textContent; | ||
} | ||
} | ||
@@ -395,3 +397,3 @@ } | ||
var textElement = childNodes[j]; | ||
if (isAdd) { | ||
if (isAdd && textElement.className !== 'e-pdfviewer-formFields') { | ||
textElement.classList.add('e-pv-cursor'); | ||
@@ -398,0 +400,0 @@ } |
@@ -16,1 +16,2 @@ /** | ||
export * from './print/index'; | ||
export * from './form-fields/index'; |
@@ -15,1 +15,2 @@ /** | ||
export * from './print/index'; | ||
export * from './form-fields/index'; |
@@ -1,2 +0,2 @@ | ||
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, L10n, Collection, Complex } from '@syncfusion/ej2-base';import { ModuleDeclaration, isNullOrUndefined, Property, Event, EmitType } from '@syncfusion/ej2-base';import { PdfViewerBase } from './index';import { Navigation } from './index';import { Magnification } from './index';import { Toolbar } from './index';import { ToolbarItem } from './index';import { LinkTarget, InteractionMode, AnnotationType, AnnotationToolbarItem, LineHeadStyle, ContextMenuAction } from './base/types';import { Annotation } from './index';import { LinkAnnotation } from './index';import { ThumbnailView } from './index';import { BookmarkView } from './index';import { TextSelection } from './index';import { TextSearch } from './index';import { Print, CalibrationUnit } from './index';import { UnloadEventArgs, LoadEventArgs, LoadFailedEventArgs, AjaxRequestFailureEventArgs, PageChangeEventArgs, PageClickEventArgs, ZoomChangeEventArgs, HyperlinkClickEventArgs, HyperlinkMouseOverArgs } from './index';import { AnnotationAddEventArgs, AnnotationRemoveEventArgs, AnnotationPropertiesChangeEventArgs, AnnotationResizeEventArgs, AnnotationSelectEventArgs } from './index';import { PdfAnnotationBase, ZOrderPageTable } from '../diagram/pdf-annotation';import { PdfAnnotationBaseModel } from '../diagram/pdf-annotation-model';import { Drawing, ClipBoardObject } from '../diagram/drawing';import { Selector } from '../diagram/selector';import { SelectorModel } from '../diagram/selector-model';import { PointModel, IElement, Rect } from '@syncfusion/ej2-drawings';import { renderAdornerLayer } from '../diagram/dom-util'; | ||
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, L10n, Collection, Complex } from '@syncfusion/ej2-base';import { ModuleDeclaration, isNullOrUndefined, Property, Event, EmitType } from '@syncfusion/ej2-base';import { PdfViewerBase } from './index';import { Navigation } from './index';import { Magnification } from './index';import { Toolbar } from './index';import { ToolbarItem } from './index';import { LinkTarget, InteractionMode, AnnotationType, AnnotationToolbarItem, LineHeadStyle, ContextMenuAction } from './base/types';import { Annotation } from './index';import { LinkAnnotation } from './index';import { ThumbnailView } from './index';import { BookmarkView } from './index';import { TextSelection } from './index';import { TextSearch } from './index';import { FormFields } from './index';import { Print, CalibrationUnit } from './index';import { UnloadEventArgs, LoadEventArgs, LoadFailedEventArgs, AjaxRequestFailureEventArgs, PageChangeEventArgs, PageClickEventArgs, ZoomChangeEventArgs, HyperlinkClickEventArgs, HyperlinkMouseOverArgs } from './index';import { AnnotationAddEventArgs, AnnotationRemoveEventArgs, AnnotationPropertiesChangeEventArgs, AnnotationResizeEventArgs, AnnotationSelectEventArgs } from './index';import { PdfAnnotationBase, ZOrderPageTable } from '../diagram/pdf-annotation';import { PdfAnnotationBaseModel } from '../diagram/pdf-annotation-model';import { Drawing, ClipBoardObject } from '../diagram/drawing';import { Selector } from '../diagram/selector';import { SelectorModel } from '../diagram/selector-model';import { PointModel, IElement, Rect } from '@syncfusion/ej2-drawings';import { renderAdornerLayer } from '../diagram/dom-util'; | ||
import {IAjaxHeaders} from "./pdfviewer"; | ||
@@ -937,2 +937,8 @@ import {ComponentModel} from '@syncfusion/ej2-base'; | ||
/** | ||
* Enable or disable the form fields in the Pdfviewer. | ||
* @default true | ||
*/ | ||
enableFormFields?: boolean; | ||
/** | ||
* Enable or disables the text markup annotation in the PdfViewer. | ||
@@ -939,0 +945,0 @@ * @default true |
@@ -18,2 +18,3 @@ import { Component, INotifyPropertyChanged, ChildProperty, L10n } from '@syncfusion/ej2-base'; | ||
import { TextSearch } from './index'; | ||
import { FormFields } from './index'; | ||
import { Print, CalibrationUnit } from './index'; | ||
@@ -805,2 +806,7 @@ import { UnloadEventArgs, LoadEventArgs, LoadFailedEventArgs, AjaxRequestFailureEventArgs, PageChangeEventArgs, PageClickEventArgs, ZoomChangeEventArgs, HyperlinkClickEventArgs, HyperlinkMouseOverArgs } from './index'; | ||
/** | ||
* Enable or disable the form fields in the Pdfviewer. | ||
* @default true | ||
*/ | ||
enableFormFields: boolean; | ||
/** | ||
* Enable or disables the text markup annotation in the PdfViewer. | ||
@@ -1005,2 +1011,6 @@ * @default true | ||
/** | ||
* @private | ||
*/ | ||
formFieldsModule: FormFields; | ||
/** | ||
* Gets the bookmark view object of the pdf viewer. | ||
@@ -1007,0 +1017,0 @@ * @asptype BookmarkView |
@@ -984,3 +984,2 @@ var __extends = (this && this.__extends) || (function () { | ||
this.drawing.renderLabels(this); | ||
this.renderComplete(); | ||
}; | ||
@@ -1109,2 +1108,7 @@ PdfViewer.prototype.getModuleName = function () { | ||
} | ||
if (this.enableFormFields) { | ||
modules.push({ | ||
member: 'FormFields', args: [this, this.viewerBase] | ||
}); | ||
} | ||
return modules; | ||
@@ -1547,2 +1551,5 @@ }; | ||
Property(true) | ||
], PdfViewer.prototype, "enableFormFields", void 0); | ||
__decorate([ | ||
Property(true) | ||
], PdfViewer.prototype, "enableTextMarkupAnnotation", void 0); | ||
@@ -1549,0 +1556,0 @@ __decorate([ |
@@ -24,2 +24,7 @@ import { PdfViewer } from '../index'; | ||
private createRequestForPrint; | ||
private renderFieldsForPrint; | ||
/** | ||
* @private | ||
*/ | ||
applyPosition(inputField: any, bounds: any, font: any, heightRatio: number, widthRatio: number): any; | ||
private printWindowOpen; | ||
@@ -26,0 +31,0 @@ /** |
@@ -171,2 +171,55 @@ import { createElement, Browser } from '@syncfusion/ej2-base'; | ||
}; | ||
// tslint:disable-next-line | ||
Print.prototype.renderFieldsForPrint = function (pageIndex, heightRatio, widthRatio) { | ||
// tslint:disable-next-line | ||
var data = window.sessionStorage.getItem('formfields'); | ||
// tslint:disable-next-line | ||
var formFieldsData = JSON.parse(data); | ||
for (var i = 0; i < formFieldsData.length; i++) { | ||
// tslint:disable-next-line | ||
var currentData = formFieldsData[i]; | ||
// tslint:disable-next-line | ||
if (parseFloat(currentData['PageIndex']) === pageIndex) { | ||
// tslint:disable-next-line | ||
var targetField = this.frameDoc.document.getElementById('fields_' + pageIndex); | ||
// tslint:disable-next-line | ||
var inputField = this.pdfViewer.formFieldsModule.createFormFields(currentData, pageIndex, i, targetField); | ||
if (inputField) { | ||
// tslint:disable-next-line | ||
var bounds = currentData['LineBounds']; | ||
// tslint:disable-next-line | ||
var font = currentData['Font']; | ||
this.applyPosition(inputField, bounds, font, heightRatio, widthRatio); | ||
targetField.appendChild(inputField); | ||
} | ||
} | ||
} | ||
}; | ||
/** | ||
* @private | ||
*/ | ||
// tslint:disable-next-line | ||
Print.prototype.applyPosition = function (inputField, bounds, font, heightRatio, widthRatio) { | ||
if (bounds) { | ||
var left = (this.pdfViewer.formFieldsModule.ConvertPointToPixel(bounds.X)) / widthRatio; | ||
var top_1 = (this.pdfViewer.formFieldsModule.ConvertPointToPixel(bounds.Y)) / heightRatio; | ||
var width = (this.pdfViewer.formFieldsModule.ConvertPointToPixel(bounds.Width)) / widthRatio; | ||
var height = (this.pdfViewer.formFieldsModule.ConvertPointToPixel(bounds.Height)) / heightRatio; | ||
var fontHeight = 0; | ||
if (font !== null && font.Height) { | ||
inputField.style.fontfamily = font.Name; | ||
if (font.Italic) { | ||
inputField.style.fontStyle = 'italic'; | ||
} | ||
if (font.Bold) { | ||
inputField.style.fontWeight = 'Bold'; | ||
} | ||
fontHeight = this.pdfViewer.formFieldsModule.ConvertPointToPixel(font.Size); | ||
} | ||
if (Browser.isIE) { | ||
top_1 = top_1 - 6; | ||
} | ||
this.pdfViewer.formFieldsModule.setStyleToTextDiv(inputField, left, top_1, fontHeight, width, height, true); | ||
} | ||
}; | ||
Print.prototype.printWindowOpen = function () { | ||
@@ -200,3 +253,10 @@ var _this = this; | ||
var canvasUrl = this.printViewerContainer.children[i].toDataURL(); | ||
this.frameDoc.document.write('<div style="margin:0mm;width:816px;height:1056px;position:relative"><img src="' + canvasUrl + '" id="' + 'image_' + i + '" /></div>'); | ||
this.frameDoc.document.write('<div style="margin:0mm;width:816px;height:1056px;position:relative"><img src="' + canvasUrl + '" id="' + 'image_' + i + '" /><div id="' + 'fields_' + i + '" style="margin:0px;top:0px;left:0px;position:absolute;width:816px;height:1056px;z-index:2"></div></div>'); | ||
if (this.pdfViewer.formFieldsModule) { | ||
var pageWidth = this.pdfViewerBase.pageSize[i].width; | ||
var pageHeight = this.pdfViewerBase.pageSize[i].height; | ||
var heightRatio = pageHeight / 1056; | ||
var widthRatio = pageWidth / 816; | ||
this.renderFieldsForPrint(i, heightRatio, widthRatio); | ||
} | ||
} | ||
@@ -203,0 +263,0 @@ this.pdfViewerBase.showPrintLoadingIndicator(false); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20490734
181
141643
2
+ Added@syncfusion/ej2-base@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-buttons@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-calendars@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-data@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-drawings@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-dropdowns@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-icons@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-inplace-editor@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-inputs@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-lists@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-navigations@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-notifications@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-popups@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-richtexteditor@17.2.48-beta(transitive)
+ Added@syncfusion/ej2-splitbuttons@17.2.48-beta(transitive)
- Removed@syncfusion/ej2-base@17.2.49(transitive)
- Removed@syncfusion/ej2-buttons@17.2.47(transitive)
- Removed@syncfusion/ej2-calendars@17.2.49(transitive)
- Removed@syncfusion/ej2-data@17.2.47(transitive)
- Removed@syncfusion/ej2-drawings@17.2.47(transitive)
- Removed@syncfusion/ej2-dropdowns@17.2.49(transitive)
- Removed@syncfusion/ej2-icons@17.2.47(transitive)
- Removed@syncfusion/ej2-inplace-editor@17.2.51(transitive)
- Removed@syncfusion/ej2-inputs@17.2.52(transitive)
- Removed@syncfusion/ej2-lists@17.2.47(transitive)
- Removed@syncfusion/ej2-navigations@17.2.49(transitive)
- Removed@syncfusion/ej2-notifications@17.2.47(transitive)
- Removed@syncfusion/ej2-popups@17.2.47(transitive)
- Removed@syncfusion/ej2-richtexteditor@17.2.52(transitive)
- Removed@syncfusion/ej2-splitbuttons@17.2.47(transitive)