Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-pdfviewer

Package Overview
Dependencies
Maintainers
4
Versions
298
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-pdfviewer - npm Package Compare versions

Comparing version 17.2.48-beta to 17.2.49

12

CHANGELOG.md

@@ -7,2 +7,14 @@ # Changelog

#### Bug Fixes
- #246044 – The assigned author name is now preserved properly while loading or saving the document in PDF Viewer.
- #245087 – The Polygon, Perimeter, and Volume annotations will be drawn properly in the low zoom values.
- #245820 - Magnification on double tap will no longer happen when the pinch zoom is disabled in the PDF Viewer control.
- #244787 – The Comment panel is now opened properly while double clicking the annotation created from the code behind.
- #246041 - The warning message will no longer be thrown when the web action method is executed.
## 17.2.47 (2019-08-27)
### PDF Viewer
#### New Features

@@ -9,0 +21,0 @@

2

dist/global/index.d.ts
/*!
* filename: index.d.ts
* version : 17.2.48-beta
* version : 17.2.49
* 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.34",
"_id": "@syncfusion/ej2-pdfviewer@17.2.47",
"_inBundle": false,
"_integrity": "sha512-aaxP8Pj0QOkvKGXoZVjACPlUb9Iwy+uO0m0HQV09ZaD0zc7Z23L4pVfzDfwvJmTqxcUQ+BglOD37wvaBmzmkAg==",
"_integrity": "sha512-HhJcWe7c1cveF6+3IOL7g2gsbwi+6lEMEo6i3DY2EXH2bmak7R7eVuqC3Z3oR4Ch1Qn7L5V7ATuotqk4Gf/oKA==",
"_location": "/@syncfusion/ej2-pdfviewer",

@@ -26,6 +26,6 @@ "_phantomChildren": {},

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-production/@syncfusion/ej2-pdfviewer/-/ej2-pdfviewer-17.2.34.tgz",
"_shasum": "43654a62002b259a4db24e281793d844db9834d2",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-pdfviewer/-/ej2-pdfviewer-17.2.47.tgz",
"_shasum": "944a452d8207ac60902a0a3f5ed68168725e3cd6",
"_spec": "@syncfusion/ej2-pdfviewer@*",
"_where": "/jenkins/workspace/ation_hotfix_16.4.0.42_Vol4-CJVRBFC7Z7RSISPRJNEMNQSRMCB6XTG67IJD6R2DVNXFIKQEITTQ/packages/included",
"_where": "/jenkins/workspace/ation_hotfix_17.2.0.34_Vol2-DDPJ6C2YEWTWLLKKNA7AG2JBE6DYTCTNGMHGORWGAYAVCL6L7OLQ/packages/included",
"author": {

@@ -39,15 +39,15 @@ "name": "Syncfusion Inc."

"dependencies": {
"@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"
"@syncfusion/ej2-base": "~17.2.49",
"@syncfusion/ej2-buttons": "~17.2.47",
"@syncfusion/ej2-calendars": "~17.2.49",
"@syncfusion/ej2-data": "~17.2.47",
"@syncfusion/ej2-drawings": "~17.2.47",
"@syncfusion/ej2-dropdowns": "~17.2.49",
"@syncfusion/ej2-inplace-editor": "~17.2.47",
"@syncfusion/ej2-inputs": "~17.2.49",
"@syncfusion/ej2-lists": "~17.2.47",
"@syncfusion/ej2-navigations": "~17.2.49",
"@syncfusion/ej2-notifications": "~17.2.47",
"@syncfusion/ej2-popups": "~17.2.47",
"@syncfusion/ej2-richtexteditor": "~17.2.49"
},

@@ -78,4 +78,4 @@ "deprecated": false,

"typings": "index.d.ts",
"version": "17.2.48-beta",
"version": "17.2.49",
"sideEffects": false
}
/**
* @hidden
*/
export declare type AnnotationType =
export declare type PdfAnnotationType =
/**

@@ -6,0 +6,0 @@ * Rectangle - Represents the annotation type as Rectangle.

/**
* PdfViewer
* PdfViewer diagram component exported items
*/
export * from './drawing';
export * from './action';
export * from './connector-util';
export * from './dom-util';
export * from './drawing-util';
export * from './enum';
export * from './pdf-annotation';
export * from './pdf-annotation-model';
export * from './selector';
export * from './selector-model';
export * from './tools';
/**
* PdfViewer
* PdfViewer diagram component exported items
*/
export * from './drawing';
export * from './action';
export * from './connector-util';
export * from './dom-util';
export * from './drawing-util';
export * from './pdf-annotation';
export * from './selector';
export * from './tools';

@@ -1,2 +0,2 @@

import { ChildProperty, Property, Complex } from '@syncfusion/ej2-base';import { PointModel, DecoratorShapes } from '@syncfusion/ej2-drawings';import { Point } from '@syncfusion/ej2-drawings';import { Size } from '@syncfusion/ej2-drawings';import { Container } from '@syncfusion/ej2-drawings';import { AnnotationType } from './enum';import { ICommentsCollection, IReviewCollection } from '../pdfviewer';
import { ChildProperty, Property, Complex } from '@syncfusion/ej2-base';import { PointModel, DecoratorShapes } from '@syncfusion/ej2-drawings';import { Point } from '@syncfusion/ej2-drawings';import { Size } from '@syncfusion/ej2-drawings';import { Container } from '@syncfusion/ej2-drawings';import { PdfAnnotationType } from './enum';import { ICommentsCollection, IReviewCollection } from '../pdfviewer';

@@ -85,3 +85,3 @@ /**

*/
shapeAnnotationType?: AnnotationType;
shapeAnnotationType?: PdfAnnotationType;

@@ -88,0 +88,0 @@ /**

@@ -6,3 +6,3 @@ import { ChildProperty } from '@syncfusion/ej2-base';

import { Container } from '@syncfusion/ej2-drawings';
import { AnnotationType } from './enum';
import { PdfAnnotationType } from './enum';
import { ICommentsCollection, IReviewCollection } from '../pdfviewer';

@@ -79,3 +79,3 @@ /**

*/
shapeAnnotationType: AnnotationType;
shapeAnnotationType: PdfAnnotationType;
/**

@@ -82,0 +82,0 @@ * Represents the measure type of the annotation

@@ -919,70 +919,45 @@ var __extends = (this && this.__extends) || (function () {

_super.prototype.mouseMove.call(this, args);
var bounds = new Rect(args.position.x - 5, args.position.y - 5, args.position.x + 5, args.position.y + 5);
if (((this.drawingObject && bounds.containsPoint((this.drawingObject.vertexPoints[0]))) || isDoubleClineck) && this.dragging) {
if (this.inAction) {
this.inAction = false;
if (this.drawingObject) {
this.drawingObject.vertexPoints.splice(this.drawingObject.vertexPoints.length - 1, 1);
if (this.action === 'Polygon') {
this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length - 1] = this.drawingObject.vertexPoints[0];
this.commandHandler.nodePropertyChange(this.drawingObject, { vertexPoints: this.drawingObject.vertexPoints });
var cobject = cloneObject(this.drawingObject);
cobject.shapeAnnotationType = 'Polygon';
cobject.bounds.width = cobject.wrapper.actualSize.width;
cobject.bounds.height = cobject.wrapper.actualSize.height;
cobject.bounds.x = this.drawingObject.wrapper.bounds.x;
cobject.bounds.y = this.drawingObject.wrapper.bounds.y;
this.commandHandler.add(cobject);
this.commandHandler.remove(this.drawingObject);
this.commandHandler.select([cobject.id]);
var drawingObject = this.commandHandler.selectedItems.annotations[0];
// tslint:disable-next-line:max-line-length
if (this.commandHandler.enableShapeAnnotation && (isNullOrUndefined(drawingObject.measureType) || drawingObject.measureType === '')) {
this.commandHandler.annotation.shapeAnnotationModule.renderShapeAnnotations(drawingObject, drawingObject.pageIndex);
if (this.drawingObject) {
// tslint:disable-next-line:max-line-length
var bounds = new Rect(this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length - 1].x - 20, this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length - 1].y - 20, 40, 40);
var point = { x: this.drawingObject.vertexPoints[0].x, y: this.drawingObject.vertexPoints[0].y };
if ((bounds.containsPoint(point) || isDoubleClineck) && this.dragging) {
if (this.inAction) {
this.inAction = false;
if (this.drawingObject) {
if (this.drawingObject.vertexPoints.length > 2) {
this.drawingObject.vertexPoints.splice(this.drawingObject.vertexPoints.length - 1, 1);
}
// tslint:disable-next-line:max-line-length
if (this.commandHandler.enableMeasureAnnotation && (drawingObject.measureType === 'Area' || drawingObject.measureType === 'Volume')) {
if (drawingObject.measureType === 'Area') {
// tslint:disable-next-line:max-line-length
drawingObject.notes = this.commandHandler.annotation.measureAnnotationModule.calculateArea(drawingObject.vertexPoints);
this.commandHandler.annotation.stickyNotesAnnotationModule.addTextToComments(drawingObject.annotName, drawingObject.notes);
if (this.action === 'Polygon') {
this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length - 1] = this.drawingObject.vertexPoints[0];
this.commandHandler.nodePropertyChange(this.drawingObject, { vertexPoints: this.drawingObject.vertexPoints });
var cobject = cloneObject(this.drawingObject);
cobject.shapeAnnotationType = 'Polygon';
cobject.bounds.width = cobject.wrapper.actualSize.width;
cobject.bounds.height = cobject.wrapper.actualSize.height;
cobject.bounds.x = this.drawingObject.wrapper.bounds.x;
cobject.bounds.y = this.drawingObject.wrapper.bounds.y;
this.commandHandler.add(cobject);
this.commandHandler.remove(this.drawingObject);
this.commandHandler.select([cobject.id]);
var drawingObject = this.commandHandler.selectedItems.annotations[0];
// tslint:disable-next-line:max-line-length
if (this.commandHandler.enableShapeAnnotation && (isNullOrUndefined(drawingObject.measureType) || drawingObject.measureType === '')) {
this.commandHandler.annotation.shapeAnnotationModule.renderShapeAnnotations(drawingObject, drawingObject.pageIndex);
}
else if (drawingObject.measureType === 'Volume') {
// tslint:disable-next-line:max-line-length
if (this.commandHandler.enableMeasureAnnotation && (drawingObject.measureType === 'Area' || drawingObject.measureType === 'Volume')) {
if (drawingObject.measureType === 'Area') {
// tslint:disable-next-line:max-line-length
drawingObject.notes = this.commandHandler.annotation.measureAnnotationModule.calculateArea(drawingObject.vertexPoints);
this.commandHandler.annotation.stickyNotesAnnotationModule.addTextToComments(drawingObject.annotName, drawingObject.notes);
}
else if (drawingObject.measureType === 'Volume') {
// tslint:disable-next-line:max-line-length
drawingObject.notes = this.commandHandler.annotation.measureAnnotationModule.calculateVolume(drawingObject.vertexPoints);
this.commandHandler.annotation.stickyNotesAnnotationModule.addTextToComments(drawingObject.annotName, drawingObject.notes);
}
// tslint:disable-next-line:max-line-length
drawingObject.notes = this.commandHandler.annotation.measureAnnotationModule.calculateVolume(drawingObject.vertexPoints);
this.commandHandler.annotation.stickyNotesAnnotationModule.addTextToComments(drawingObject.annotName, drawingObject.notes);
this.commandHandler.annotation.measureAnnotationModule.renderMeasureShapeAnnotations(drawingObject, drawingObject.pageIndex);
}
// tslint:disable-next-line:max-line-length
this.commandHandler.annotation.measureAnnotationModule.renderMeasureShapeAnnotations(drawingObject, drawingObject.pageIndex);
}
// tslint:disable-next-line
var setting = {
opacity: drawingObject.opacity, fillColor: drawingObject.fillColor, strokeColor: drawingObject.strokeColor,
thickness: drawingObject.thickness, author: drawingObject.author, subject: drawingObject.subject,
modifiedDate: drawingObject.modifiedDate, borderDashArray: drawingObject.borderDashArray,
lineHeadStartStyle: this.commandHandler.annotation.getArrowString(drawingObject.sourceDecoraterShapes),
lineHeadEndStyle: this.commandHandler.annotation.getArrowString(drawingObject.taregetDecoraterShapes)
};
// tslint:disable-next-line
var bounds_1 = { left: drawingObject.bounds.x, top: drawingObject.bounds.y, width: drawingObject.bounds.width, height: drawingObject.bounds.height };
// tslint:disable-next-line:max-line-length
this.commandHandler.fireAnnotationAdd(drawingObject.pageIndex, this.commandHandler.annotation.getAnnotationIndex(drawingObject.pageIndex, drawingObject.id), this.commandHandler.annotation.getAnnotationType(drawingObject.shapeAnnotationType, drawingObject.measureType), bounds_1, setting);
}
else {
this.drawingObject.vertexPoints.splice(this.drawingObject.vertexPoints.length - 1, 1);
this.commandHandler.nodePropertyChange(this.drawingObject, {
// tslint:disable-next-line:max-line-length
vertexPoints: this.drawingObject.vertexPoints, sourceDecoraterShapes: this.commandHandler.drawingObject.sourceDecoraterShapes,
taregetDecoraterShapes: this.commandHandler.drawingObject.taregetDecoraterShapes
});
this.commandHandler.select([this.drawingObject.id]);
if (this.commandHandler.enableMeasureAnnotation && this.drawingObject.measureType === 'Perimeter') {
removePerimeterLabel(this.drawingObject);
this.commandHandler.renderDrawing(null, this.drawingObject.pageIndex);
// tslint:disable-next-line:max-line-length
this.drawingObject.notes = this.commandHandler.annotation.measureAnnotationModule.calculatePerimeter(this.drawingObject);
this.commandHandler.annotation.stickyNotesAnnotationModule.addTextToComments(this.drawingObject.annotName, this.drawingObject.notes);
// tslint:disable-next-line:max-line-length
this.commandHandler.annotation.measureAnnotationModule.renderMeasureShapeAnnotations(this.drawingObject, this.drawingObject.pageIndex);
var drawingObject = this.commandHandler.selectedItems.annotations[0];
// tslint:disable-next-line

@@ -997,17 +972,48 @@ var setting = {

// tslint:disable-next-line
var bounds_2 = { left: drawingObject.bounds.x, top: drawingObject.bounds.y, width: drawingObject.bounds.width, height: drawingObject.bounds.height };
var bounds_1 = { left: drawingObject.bounds.x, top: drawingObject.bounds.y, width: drawingObject.bounds.width, height: drawingObject.bounds.height };
// tslint:disable-next-line:max-line-length
this.commandHandler.fireAnnotationAdd(drawingObject.pageIndex, 0, this.commandHandler.annotation.getAnnotationType(drawingObject.shapeAnnotationType, drawingObject.measureType), bounds_2, setting);
this.commandHandler.fireAnnotationAdd(drawingObject.pageIndex, this.commandHandler.annotation.getAnnotationIndex(drawingObject.pageIndex, drawingObject.id), this.commandHandler.annotation.getAnnotationType(drawingObject.shapeAnnotationType, drawingObject.measureType), bounds_1, setting);
}
else {
this.drawingObject.vertexPoints.splice(this.drawingObject.vertexPoints.length - 1, 1);
this.commandHandler.nodePropertyChange(this.drawingObject, {
// tslint:disable-next-line:max-line-length
vertexPoints: this.drawingObject.vertexPoints, sourceDecoraterShapes: this.commandHandler.drawingObject.sourceDecoraterShapes,
taregetDecoraterShapes: this.commandHandler.drawingObject.taregetDecoraterShapes
});
this.commandHandler.select([this.drawingObject.id]);
if (this.commandHandler.enableMeasureAnnotation && this.drawingObject.measureType === 'Perimeter') {
removePerimeterLabel(this.drawingObject);
this.commandHandler.renderDrawing(null, this.drawingObject.pageIndex);
// tslint:disable-next-line:max-line-length
this.drawingObject.notes = this.commandHandler.annotation.measureAnnotationModule.calculatePerimeter(this.drawingObject);
this.commandHandler.annotation.stickyNotesAnnotationModule.addTextToComments(this.drawingObject.annotName, this.drawingObject.notes);
// tslint:disable-next-line:max-line-length
this.commandHandler.annotation.measureAnnotationModule.renderMeasureShapeAnnotations(this.drawingObject, this.drawingObject.pageIndex);
var drawingObject = this.commandHandler.selectedItems.annotations[0];
// tslint:disable-next-line
var setting = {
opacity: drawingObject.opacity, fillColor: drawingObject.fillColor, strokeColor: drawingObject.strokeColor,
thickness: drawingObject.thickness, author: drawingObject.author, subject: drawingObject.subject,
modifiedDate: drawingObject.modifiedDate, borderDashArray: drawingObject.borderDashArray,
lineHeadStartStyle: this.commandHandler.annotation.getArrowString(drawingObject.sourceDecoraterShapes),
lineHeadEndStyle: this.commandHandler.annotation.getArrowString(drawingObject.taregetDecoraterShapes)
};
// tslint:disable-next-line
var bounds_2 = { left: drawingObject.bounds.x, top: drawingObject.bounds.y, width: drawingObject.bounds.width, height: drawingObject.bounds.height };
// tslint:disable-next-line:max-line-length
this.commandHandler.fireAnnotationAdd(drawingObject.pageIndex, 0, this.commandHandler.annotation.getAnnotationType(drawingObject.shapeAnnotationType, drawingObject.measureType), bounds_2, setting);
}
}
// tslint:disable-next-line
this.commandHandler.annotation.addAction(this.pageIndex, null, this.drawingObject, 'Addition', '', this.drawingObject, this.drawingObject);
this.drawingObject = null;
}
// tslint:disable-next-line
this.commandHandler.annotation.addAction(this.pageIndex, null, this.drawingObject, 'Addition', '', this.drawingObject, this.drawingObject);
this.drawingObject = null;
}
this.endAction();
}
this.endAction();
else if (this.inAction && !this.dragging) {
this.commandHandler.remove(this.drawingObject);
}
}
else if (this.inAction && !this.dragging) {
this.commandHandler.remove(this.drawingObject);
}
};

@@ -1014,0 +1020,0 @@ /** @private */

@@ -264,3 +264,3 @@ import { PdfViewer, PdfViewerBase, AnnotationType, TextMarkupAnnotation, ShapeAnnotation, StampAnnotation, StickyNotesAnnotation, IPopupAnnotation, MeasureAnnotation } from '../index';

*/
renderAnnotations(pageNumber: number, shapeAnnotation: any, measureShapeAnnotation: any, textMarkupAnnotation: any, canvas?: any, isImportTextMarkup?: boolean): void;
renderAnnotations(pageNumber: number, shapeAnnotation: any, measureShapeAnnotation: any, textMarkupAnnotation: any, canvas?: any, isImportAnnotations?: boolean): void;
/**

@@ -267,0 +267,0 @@ * @private

@@ -206,3 +206,3 @@ import { PdfViewer, PdfViewerBase, IRectangle, AnnotationType as AnnotType } from '../../index';

*/
renderMeasureShapeAnnotations(shapeAnnotations: any, pageNumber: number): void;
renderMeasureShapeAnnotations(shapeAnnotations: any, pageNumber: number, isImportAction?: boolean): void;
/**

@@ -209,0 +209,0 @@ * @private

@@ -65,3 +65,3 @@ import { ColorPicker, NumericTextBox } from '@syncfusion/ej2-inputs';

// tslint:disable-next-line
MeasureAnnotation.prototype.renderMeasureShapeAnnotations = function (shapeAnnotations, pageNumber) {
MeasureAnnotation.prototype.renderMeasureShapeAnnotations = function (shapeAnnotations, pageNumber, isImportAction) {
if (shapeAnnotations) {

@@ -71,3 +71,3 @@ if (shapeAnnotations.length >= 1) {

var measureAnnots = this.pdfViewer.annotation.getStoredAnnotations(pageNumber, shapeAnnotations, '_annotations_shape_measure');
if (!measureAnnots) {
if (!measureAnnots || isImportAction) {
for (var i = 0; i < shapeAnnotations.length; i++) {

@@ -79,3 +79,2 @@ // tslint:disable-next-line

if (annotation.ShapeAnnotationType) {
annotation.Author = this.pdfViewer.annotationModule.updateAnnotationAuthor('measure', annotation.Subject);
var vertexPoints = null;

@@ -82,0 +81,0 @@ if (annotation.VertexPoints) {

@@ -155,3 +155,3 @@ import { PdfViewer, PdfViewerBase, IRectangle, ICommentsCollection, IReviewCollection, AnnotationType as AnnotType, LineHeadStyle } from '../../index';

*/
renderShapeAnnotations(shapeAnnotations: any, pageNumber: number): void;
renderShapeAnnotations(shapeAnnotations: any, pageNumber: number, isImportAcion?: boolean): void;
/**

@@ -158,0 +158,0 @@ * @private

@@ -45,3 +45,3 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';

// tslint:disable-next-line
ShapeAnnotation.prototype.renderShapeAnnotations = function (shapeAnnotations, pageNumber) {
ShapeAnnotation.prototype.renderShapeAnnotations = function (shapeAnnotations, pageNumber, isImportAcion) {
if (shapeAnnotations) {

@@ -51,3 +51,3 @@ if (shapeAnnotations.length >= 1) {

var shapeAnnots = this.pdfViewer.annotation.getStoredAnnotations(pageNumber, shapeAnnotations, '_annotations_shape');
if (!shapeAnnots) {
if (!shapeAnnots || isImportAcion) {
for (var i = 0; i < shapeAnnotations.length; i++) {

@@ -59,9 +59,2 @@ // tslint:disable-next-line

if (annotation.ShapeAnnotationType) {
if (annotation.Subject === 'Line' && annotation.ShapeAnnotationType === 'Polygon') {
annotation.Author = this.pdfViewer.annotationModule.updateAnnotationAuthor('shape', 'Polygon');
}
else {
// tslint:disable-next-line:max-line-length
annotation.Author = this.pdfViewer.annotationModule.updateAnnotationAuthor('shape', annotation.ShapeAnnotationType);
}
var vertexPoints = null;

@@ -68,0 +61,0 @@ if (annotation.VertexPoints) {

@@ -97,3 +97,3 @@ import { PdfAnnotationBase } from '../../diagram/pdf-annotation';

*/
renderCustomImage(position: any, pageIndex: any, image: any, currentDate: any, modifiedDate: any, RotationAngle: any, opacity: any, canvas?: any, isExistingStamp?: boolean): void;
renderCustomImage(position: any, pageIndex: any, image: any, currentDate: any, modifiedDate: any, RotationAngle: any, opacity: any, canvas?: any, isExistingStamp?: boolean, annotation?: any): void;
private retrieveRotationAngle;

@@ -100,0 +100,0 @@ /**

@@ -79,3 +79,2 @@ import { createElement, Browser, isNullOrUndefined } from '@syncfusion/ej2-base';

var annotation = annotations[i];
annotation.Author = this.pdfViewer.annotationModule.updateAnnotationAuthor('textMarkup', annotation.Subject);
var annotationObject = null;

@@ -82,0 +81,0 @@ if (annotation.TextMarkupAnnotationType) {

import { PdfViewer } from '../index';
import { PdfViewerBase } from '../index';
import { ContextMenu as Context } from '@syncfusion/ej2-navigations';
/**

@@ -33,6 +34,9 @@ * The `NavigationPane` module is used to handle navigation pane for thumbnail and bookmark navigation of PDF viewer.

private annotationContextMenu;
private annotationMenuObj;
/**
* @private
*/
annotationMenuObj: Context;
/**
* @private
*/
isNavigationToolbarVisible: boolean;

@@ -39,0 +43,0 @@ /**

import { createElement, Browser } from '@syncfusion/ej2-base';
import { Toolbar as Tool, ContextMenu as Context, } from '@syncfusion/ej2-navigations';
import { Toolbar as Tool, ContextMenu as Context } from '@syncfusion/ej2-navigations';
import { Tooltip } from '@syncfusion/ej2-popups';

@@ -4,0 +4,0 @@ import { Toast } from '@syncfusion/ej2-notifications';

@@ -324,3 +324,2 @@ import { PdfViewer, TextLayer, ContextMenu } from '../index';

private saveDocumentHashData;
private saveFormfieldsData;
private updateWaitingPopup;

@@ -619,3 +618,4 @@ private createWaitingPopup;

private combineImportedData;
private updateExportItem;
}
export {};

@@ -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 && textDiv.className !== 'e-pdfviewer-formFields') {
if (this.pdfViewer.textSelectionModule && this.pdfViewer.enableTextSelection && !this.pdfViewerBase.isTextSelectionDisabled) {
textDiv.classList.add('e-pv-cursor');

@@ -360,9 +360,7 @@ }

var textDiv = childNodes[j];
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;
}
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;
}

@@ -397,3 +395,3 @@ }

var textElement = childNodes[j];
if (isAdd && textElement.className !== 'e-pdfviewer-formFields') {
if (isAdd) {
textElement.classList.add('e-pv-cursor');

@@ -400,0 +398,0 @@ }

@@ -16,2 +16,1 @@ /**

export * from './print/index';
export * from './form-fields/index';

@@ -15,2 +15,1 @@ /**

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 { 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 { 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 {IAjaxHeaders} from "./pdfviewer";

@@ -937,8 +937,2 @@ 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.

@@ -945,0 +939,0 @@ * @default true

@@ -18,3 +18,2 @@ import { Component, INotifyPropertyChanged, ChildProperty, L10n } from '@syncfusion/ej2-base';

import { TextSearch } from './index';
import { FormFields } from './index';
import { Print, CalibrationUnit } from './index';

@@ -806,7 +805,2 @@ 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.

@@ -1011,6 +1005,2 @@ * @default true

/**
* @private
*/
formFieldsModule: FormFields;
/**
* Gets the bookmark view object of the pdf viewer.

@@ -1017,0 +1007,0 @@ * @asptype BookmarkView

@@ -984,2 +984,3 @@ var __extends = (this && this.__extends) || (function () {

this.drawing.renderLabels(this);
this.renderComplete();
};

@@ -1108,7 +1109,2 @@ PdfViewer.prototype.getModuleName = function () {

}
if (this.enableFormFields) {
modules.push({
member: 'FormFields', args: [this, this.viewerBase]
});
}
return modules;

@@ -1551,5 +1547,2 @@ };

Property(true)
], PdfViewer.prototype, "enableFormFields", void 0);
__decorate([
Property(true)
], PdfViewer.prototype, "enableTextMarkupAnnotation", void 0);

@@ -1556,0 +1549,0 @@ __decorate([

@@ -24,7 +24,2 @@ import { PdfViewer } from '../index';

private createRequestForPrint;
private renderFieldsForPrint;
/**
* @private
*/
applyPosition(inputField: any, bounds: any, font: any, heightRatio: number, widthRatio: number): any;
private printWindowOpen;

@@ -31,0 +26,0 @@ /**

@@ -68,6 +68,12 @@ import { createElement, Browser } from '@syncfusion/ej2-base';

var printImage = result.data;
if (typeof printImage !== 'object') {
try {
printImage = JSON.parse(printImage);
if (typeof printImage !== 'object') {
if (printImage) {
if (typeof printImage !== 'object') {
try {
printImage = JSON.parse(printImage);
if (typeof printImage !== 'object') {
proxy.pdfViewerBase.onControlError(500, printImage, proxy.pdfViewer.serverActionSettings.print);
printImage = null;
}
}
catch (error) {
proxy.pdfViewerBase.onControlError(500, printImage, proxy.pdfViewer.serverActionSettings.print);

@@ -77,6 +83,2 @@ printImage = null;

}
catch (error) {
proxy.pdfViewerBase.onControlError(500, printImage, proxy.pdfViewer.serverActionSettings.print);
printImage = null;
}
}

@@ -173,55 +175,2 @@ if (printImage) {

};
// 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 () {

@@ -255,10 +204,3 @@ 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 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);
}
this.frameDoc.document.write('<div style="margin:0mm;width:816px;height:1056px;position:relative"><img src="' + canvasUrl + '" id="' + 'image_' + i + '" /></div>');
}

@@ -265,0 +207,0 @@ this.pdfViewerBase.showPrintLoadingIndicator(false);

@@ -695,17 +695,19 @@ import { createElement, Browser, isNullOrUndefined } from '@syncfusion/ej2-base';

var data = result.data;
if (typeof data !== 'object') {
try {
data = JSON.parse(data);
if (data) {
if (typeof data !== 'object') {
try {
data = JSON.parse(data);
}
catch (error) {
proxy.pdfViewerBase.onControlError(500, data, this.pdfViewer.serverActionSettings.renderPages);
data = null;
}
}
catch (error) {
proxy.pdfViewerBase.onControlError(500, data, this.pdfViewer.serverActionSettings.renderPages);
data = null;
if (data) {
if (data.pageText) {
proxy.pdfViewerBase.storeWinData(data, pageIndex);
proxy.initSearch(pageIndex, false);
}
}
}
if (data) {
if (data.pageText) {
proxy.pdfViewerBase.storeWinData(data, pageIndex);
proxy.initSearch(pageIndex, false);
}
}
};

@@ -712,0 +714,0 @@ // tslint:disable-next-line

@@ -137,19 +137,21 @@ import { AjaxHandler } from '../index';

var data = result.data;
if (typeof data !== 'object') {
try {
data = JSON.parse(data);
if (data) {
if (typeof data !== 'object') {
try {
data = JSON.parse(data);
}
catch (error) {
proxy.pdfViewerBase.onControlError(500, data, proxy.pdfViewer.serverActionSettings.renderThumbnail);
data = null;
}
}
catch (error) {
proxy.pdfViewerBase.onControlError(500, data, proxy.pdfViewer.serverActionSettings.renderThumbnail);
data = null;
if (data) {
proxy.renderThumbnailImage(data);
if (!proxy.isThumbnailCompleted) {
var index = (data && isNaN(data.endPage)) ? data.endPage : proxy.thumbnailLimit;
proxy.startIndex = index;
proxy.isThumbnailCompleted = true;
}
}
}
if (data) {
proxy.renderThumbnailImage(data);
if (!proxy.isThumbnailCompleted) {
var index = (data && isNaN(data.endPage)) ? data.endPage : proxy.thumbnailLimit;
proxy.startIndex = index;
proxy.isThumbnailCompleted = true;
}
}
};

@@ -156,0 +158,0 @@ // tslint:disable-next-line

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

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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 not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc