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

@syncfusion/ej2-pdf-export

Package Overview
Dependencies
Maintainers
2
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-pdf-export - npm Package Compare versions

Comparing version 16.3.34 to 16.4.40-beta

8

CHANGELOG.md

@@ -5,4 +5,2 @@ # Changelog

## 16.3.27 (2018-10-23)
### Pdf Export

@@ -12,8 +10,6 @@

- Upgraded TypeScript version to 3.1.3
- Compilation issue in CI is fixed.
## 16.3.17 (2018-09-12)
- Updated Readme and GitHub URL.
### Pdf Export
#### New Features

@@ -20,0 +16,0 @@

/*!
* filename: index.d.ts
* version : 16.3.34
* version : 16.4.40-beta
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"name": "@syncfusion/ej2-pdf-export",
"version": "16.3.34",
"description": "Essential JS 2 PDF Library",
"version": "16.4.40-beta",
"description": "Essential Javascript 2 PDF Library",
"author": "Syncfusion Inc.",

@@ -16,8 +16,12 @@ "license": "SEE LICENSE IN license",

"@types/requirejs": "^2.1.26",
"typescript": "^3.1.3"
"typescript": "^3.1.2"
},
"dependencies": {
"@syncfusion/ej2-compression": "~16.3.34"
"@syncfusion/ej2-compression": "~16.4.40-beta"
},
"repository": {
"type": "git",
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls.git"
},
"sideEffects": false
}

@@ -325,7 +325,27 @@ import { PdfGrid } from './pdf-grid';

}
if (this.style.cellPadding != null) {
width += (this.style.cellPadding.left + this.style.cellPadding.right);
if (!(this.objectValue instanceof PdfGrid)) {
if (this.style.cellPadding != null) {
width += (this.style.cellPadding.left + this.style.cellPadding.right);
}
else {
width += (this.row.grid.style.cellPadding.left + this.row.grid.style.cellPadding.right);
}
}
else {
width += (this.row.grid.style.cellPadding.left + this.row.grid.style.cellPadding.right);
if (this.style.cellPadding != null || typeof this.style.cellPadding !== 'undefined') {
if (typeof this.style.cellPadding.left !== 'undefined' && this.style.cellPadding.hasLeftPad) {
width += this.style.cellPadding.left;
}
if (typeof this.style.cellPadding.right !== 'undefined' && this.style.cellPadding.hasRightPad) {
width += this.style.cellPadding.right;
}
}
else {
if (typeof this.row.grid.style.cellPadding.left !== 'undefined' && this.row.grid.style.cellPadding.hasLeftPad) {
width += this.row.grid.style.cellPadding.left;
}
if (typeof this.row.grid.style.cellPadding.right !== 'undefined' && this.row.grid.style.cellPadding.hasRightPad) {
width += this.row.grid.style.cellPadding.right;
}
}
}

@@ -360,27 +380,57 @@ width += this.row.grid.style.cellSpacing;

var returnBounds = new RectangleF(bounds.x, bounds.y, bounds.width, bounds.height);
if (typeof this.style.cellPadding === 'undefined' || this.style.cellPadding == null) {
returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;
returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;
// if(this.gridRow.grid.style.cellSpacing == 0){
returnBounds.width -= (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);
//}
// else {
// returnBounds.width -= (this.cellStyle.borders.left.width + this.cellStyle.borders.right.width);
// }
returnBounds.height -= (this.gridRow.grid.style.cellPadding.bottom + this.gridRow.grid.style.cellPadding.top);
returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);
// if (this.rowSpan === 1) {
// //returnBounds.width -= (this.style.borders.left.width);
// }
if (!(this.objectValue instanceof PdfGrid)) {
if (typeof this.style.cellPadding === 'undefined' || this.style.cellPadding == null) {
returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;
returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;
returnBounds.width -= (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);
returnBounds.height -= (this.gridRow.grid.style.cellPadding.bottom + this.gridRow.grid.style.cellPadding.top);
returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);
}
else {
returnBounds.x += this.style.cellPadding.left + this.cellStyle.borders.left.width;
returnBounds.y += this.style.cellPadding.top + this.cellStyle.borders.top.width;
returnBounds.width -= (this.style.cellPadding.right + this.style.cellPadding.left);
returnBounds.width -= (this.cellStyle.borders.left.width + this.cellStyle.borders.right.width);
returnBounds.height -= (this.style.cellPadding.bottom + this.style.cellPadding.top);
returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);
if (this.rowSpan === 1) {
returnBounds.width -= (this.style.borders.left.width);
}
}
}
else {
returnBounds.x += this.style.cellPadding.left + this.cellStyle.borders.left.width;
returnBounds.y += this.style.cellPadding.top + this.cellStyle.borders.top.width;
returnBounds.width -= (this.style.cellPadding.right + this.style.cellPadding.left);
if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
if (typeof this.gridRow.grid.style.cellPadding.left !== 'undefined' && this.gridRow.grid.style.cellPadding.hasLeftPad) {
returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;
returnBounds.width -= this.gridRow.grid.style.cellPadding.left;
}
if (typeof this.gridRow.grid.style.cellPadding.top !== 'undefined' && this.gridRow.grid.style.cellPadding.hasTopPad) {
returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;
returnBounds.height -= this.gridRow.grid.style.cellPadding.top;
}
if (typeof this.gridRow.grid.style.cellPadding.right !== 'undefined' && this.gridRow.grid.style.cellPadding.hasRightPad) {
returnBounds.width -= this.gridRow.grid.style.cellPadding.right;
}
if (typeof this.gridRow.grid.style.cellPadding.bottom !== 'undefined' && this.gridRow.grid.style.cellPadding.hasBottomPad) {
returnBounds.height -= this.gridRow.grid.style.cellPadding.bottom;
}
}
else {
if (typeof this.style.cellPadding.left !== 'undefined' && this.style.cellPadding.hasLeftPad) {
returnBounds.x += this.style.cellPadding.left + this.cellStyle.borders.left.width;
returnBounds.width -= this.style.cellPadding.left;
}
if (typeof this.style.cellPadding.top !== 'undefined' && this.style.cellPadding.hasTopPad) {
returnBounds.y += this.style.cellPadding.top + this.cellStyle.borders.top.width;
returnBounds.height -= this.style.cellPadding.top;
}
if (typeof this.style.cellPadding.right !== 'undefined' && this.style.cellPadding.hasRightPad) {
returnBounds.width -= this.style.cellPadding.right;
}
if (typeof this.style.cellPadding.bottom !== 'undefined' && this.style.cellPadding.hasBottomPad) {
returnBounds.height -= this.style.cellPadding.bottom;
}
}
returnBounds.width -= (this.cellStyle.borders.left.width + this.cellStyle.borders.right.width);
returnBounds.height -= (this.style.cellPadding.bottom + this.style.cellPadding.top);
returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);
if (this.rowSpan === 1) {
returnBounds.width -= (this.style.borders.left.width);
}
}

@@ -539,20 +589,2 @@ return returnBounds;

}
if (this.gridRow.grid.style.cellSpacing != 0 || this.objectValue.style.cellSpacing != 0) {
layoutRect.x -= this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;
layoutRect.y -= this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;
}
if ((this.objectValue.style.cellPadding != null) && (this.gridRow.grid.style.cellPadding.bottom === 0.5) &&
(this.gridRow.grid.style.cellPadding.top === 0.5) && (this.row.grid.style.cellPadding.left === 5.76)
&& (this.gridRow.grid.style.cellPadding.right === 5.76)
&& (this.gridRow.grid.style.cellSpacing === 0) && (childGrid.style.cellSpacing === 0)) {
layoutRect = bounds;
}
if ((this.gridRow.grid.style.cellPadding.right != 5.76 || this.gridRow.grid.style.cellPadding.left != 5.76 ||
this.gridRow.grid.style.cellPadding.bottom != 0.5 || this.gridRow.grid.style.cellPadding.top != 0.5)
&& (childGrid.style.cellPadding.bottom === 0.5) && (childGrid.style.cellPadding.top === 0.5)
&& (childGrid.style.cellPadding.left === 5.76) && (childGrid.style.cellPadding.right === 5.76)
&& (this.gridRow.grid.style.cellSpacing === 0) && (childGrid.style.cellSpacing != 0)) {
layoutRect.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;
layoutRect.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;
}
// layoutRect = bounds;

@@ -566,3 +598,3 @@ // if (this.style.cellPadding != null){

// }
// if(this.objectValue.style.cellPadding != null && typeof this.objectValue.style.cellPadding != 'undefined'){
// if(this.objectValue.style.cellPadding != null && typeof this.objectValue.style.cellPadding !== 'undefined'){
// layoutRect = bounds;

@@ -964,3 +996,25 @@ // }

var cellIndex = this.row.cells.indexOf(this);
this.objectValue.tempWidth = this.calculateWidth();
var internalWidth = 0;
if ((this.style.cellPadding != null || typeof this.style.cellPadding !== 'undefined')) {
internalWidth = this.calculateWidth();
if (typeof this.style.cellPadding.left !== 'undefined' && this.style.cellPadding.hasLeftPad) {
internalWidth -= this.style.cellPadding.left;
}
if (typeof this.style.cellPadding.right !== 'undefined' && this.style.cellPadding.hasRightPad) {
internalWidth -= this.style.cellPadding.right;
}
}
else if ((this.row.grid.style.cellPadding != null || typeof this.row.grid.style.cellPadding !== 'undefined')) {
internalWidth = this.calculateWidth();
if (typeof this.row.grid.style.cellPadding.left !== 'undefined' && this.row.grid.style.cellPadding.hasLeftPad) {
internalWidth -= this.row.grid.style.cellPadding.left;
}
if (typeof this.row.grid.style.cellPadding.right !== 'undefined' && this.row.grid.style.cellPadding.hasRightPad) {
internalWidth -= this.row.grid.style.cellPadding.right;
}
}
else {
internalWidth = this.calculateWidth();
}
this.objectValue.tempWidth = internalWidth;
if (!this.row.cells.getCell(cellIndex).hasColSpan && !this.row.cells.getCell(cellIndex).hasRowSpan) {

@@ -976,5 +1030,9 @@ height = this.objectValue.size.height;

}
if (this.gridRow.grid.style.cellPadding.right === 5.76 && this.gridRow.grid.style.cellPadding.left === 5.76 &&
this.gridRow.grid.style.cellPadding.top === 0.5 && this.gridRow.grid.style.cellPadding.top === 0.5) {
height -= (this.row.grid.style.cellPadding.top + this.row.grid.style.cellPadding.bottom);
if (this.style.cellPadding != null || typeof this.style.cellPadding !== 'undefined') {
if (typeof this.row.grid.style.cellPadding.top !== 'undefined' && this.row.grid.style.cellPadding.hasTopPad) {
height += this.row.grid.style.cellPadding.top;
}
if (this.row.grid.style.cellPadding.hasBottomPad && typeof this.row.grid.style.cellPadding.bottom !== 'undefined') {
height += this.row.grid.style.cellPadding.bottom;
}
}

@@ -1005,7 +1063,27 @@ height += this.objectValue.style.cellSpacing;

//Add padding top and bottom value to height
if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
height += (this.row.grid.style.cellPadding.top + this.row.grid.style.cellPadding.bottom);
if (!(this.objectValue instanceof PdfGrid)) {
if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
height += (this.row.grid.style.cellPadding.top + this.row.grid.style.cellPadding.bottom);
}
else {
height += (this.style.cellPadding.top + this.style.cellPadding.bottom);
}
}
else {
height += (this.style.cellPadding.top + this.style.cellPadding.bottom);
if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
if (typeof this.row.grid.style.cellPadding.top !== 'undefined' && this.row.grid.style.cellPadding.hasTopPad) {
height += this.row.grid.style.cellPadding.top;
}
if (typeof this.row.grid.style.cellPadding.bottom !== 'undefined' && this.row.grid.style.cellPadding.hasBottomPad) {
height += this.row.grid.style.cellPadding.bottom;
}
}
else {
if (typeof this.style.cellPadding.top !== 'undefined' && this.style.cellPadding.hasTopPad) {
height += this.style.cellPadding.top;
}
if (typeof this.style.cellPadding.bottom !== 'undefined' && this.style.cellPadding.hasBottomPad) {
height += this.style.cellPadding.bottom;
}
}
}

@@ -1012,0 +1090,0 @@ height += this.row.grid.style.cellSpacing;

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

import { PdfGridLayouter } from './../../structured-elements/grid/layout/grid-layouter';
import { PdfTextAlignment } from '../../graphics/enum';
var PdfGrid = /** @class */ (function (_super) {

@@ -558,4 +557,9 @@ __extends(PdfGrid, _super);

var childGridColumnWidth = 0;
if ((this.ParentCell.row.grid.style.cellPadding != null)) {
padding += (this.ParentCell.row.grid.style.cellPadding.top + this.ParentCell.row.grid.style.cellPadding.bottom);
if (this.ParentCell.style.cellPadding != null || typeof this.ParentCell.style.cellPadding !== 'undefined') {
if (typeof this.ParentCell.style.cellPadding.left != 'undefined' && this.ParentCell.style.cellPadding.hasLeftPad) {
padding += this.ParentCell.style.cellPadding.left;
}
if (typeof this.ParentCell.style.cellPadding.right != 'undefined' && this.ParentCell.style.cellPadding.hasRightPad) {
padding += this.ParentCell.style.cellPadding.right;
}
}

@@ -571,6 +575,10 @@ for (var i = 0; i < this.ParentCell.columnSpan; i++) {

}
// if((this.ParentCell.row.grid.style.cellPadding != null))
// {
// padding += (this.ParentCell.style.cellPadding.top + this.ParentCell.style.cellPadding.bottom);
// }
if ((this.ParentCell.row.grid.style.cellPadding != null || typeof this.ParentCell.row.grid.style.cellPadding != 'undefined')) {
if (typeof this.ParentCell.row.grid.style.cellPadding.top != 'undefined' && this.ParentCell.row.grid.style.cellPadding.hasTopPad) {
padding += this.ParentCell.row.grid.style.cellPadding.top;
}
if (typeof this.ParentCell.row.grid.style.cellPadding.bottom != 'undefined' && this.ParentCell.row.grid.style.cellPadding.hasBottomPad) {
padding += this.ParentCell.row.grid.style.cellPadding.bottom;
}
}
if (this.ParentCell.row.grid.style.cellSpacing != 0) {

@@ -580,10 +588,5 @@ columnWidth -= this.ParentCell.row.grid.style.cellSpacing * 2;

if (columnWidth > padding) {
if (padding != 1) {
childGridColumnWidth = (columnWidth - padding) / columnCount;
}
else {
childGridColumnWidth = (columnWidth) / columnCount;
}
childGridColumnWidth = (columnWidth - padding) / columnCount;
this.tempWidth = childGridColumnWidth;
if (this.ParentCell != null && this.ParentCell.stringFormat.alignment != PdfTextAlignment.Right) {
if (this.ParentCell != null) {
for (var j = 0; j < this.columns.count; j++) {

@@ -606,3 +609,3 @@ if (!this.columns.getColumn(j).isCustomWidth)

// }
// }
// }
}

@@ -714,9 +717,2 @@ else {

}
if (this.style.cellPadding != null) {
padding += (this.style.cellPadding.top + this.style.cellPadding.bottom);
}
// else if((this.gridStyle.cellPadding != null))
// {
// padding += (this.gridStyle.cellPadding.top + this.gridStyle.cellPadding.bottom);
// }
// if (this.style.cellSpacing != 0){

@@ -726,5 +722,2 @@ // colWidth -= this.style.cellSpacing * 2;

if (colWidth > 0) {
if ((this.ParentCell.row.grid.style.cellPadding != null)) {
padding += (this.ParentCell.row.grid.style.cellPadding.top + this.ParentCell.row.grid.style.cellPadding.bottom);
}
if (this.ParentCell.row.grid.style.cellSpacing != 0) {

@@ -735,9 +728,4 @@ colWidth -= this.ParentCell.row.grid.style.cellSpacing * 2;

if (colWidth > padding) {
if (padding != 1) {
childGridColWidth = (colWidth - padding) / colCount;
}
else {
childGridColWidth = (colWidth) / colCount;
}
if (this.ParentCell != null && this.ParentCell.stringFormat.alignment != PdfTextAlignment.Right) {
childGridColWidth = (colWidth) / colCount;
if (this.ParentCell != null) {
for (var j = 0; j < this.columns.count; j++) {

@@ -744,0 +732,0 @@ if (!this.columns.getColumn(j).isCustomWidth)

@@ -92,2 +92,22 @@ /**

/**
* The 'left' border padding set.
* @private
*/
hasLeftPad: boolean;
/**
* The 'right' border padding set.
* @private
*/
hasRightPad: boolean;
/**
* The 'top' border padding set.
* @private
*/
hasTopPad: boolean;
/**
* The 'bottom' border padding set.
* @private
*/
hasBottomPad: boolean;
/**
* Gets or sets the `left` value of the edge

@@ -94,0 +114,0 @@ * @private

@@ -125,2 +125,22 @@ /**

function PdfPaddings(left, right, top, bottom) {
/**
* The 'left' border padding set.
* @private
*/
this.hasLeftPad = false;
/**
* The 'right' border padding set.
* @private
*/
this.hasRightPad = false;
/**
* The 'top' border padding set.
* @private
*/
this.hasTopPad = false;
/**
* The 'bottom' border padding set.
* @private
*/
this.hasBottomPad = false;
if (typeof left === 'undefined') {

@@ -130,3 +150,3 @@ //5.76 and 0 are taken from ms-word default table margins.

//0.5 is set for top and bottom by default.
this.bottom = this.topPad = 0.5;
this.bottomPad = this.topPad = 0.5;
}

@@ -138,2 +158,6 @@ else {

this.bottomPad = bottom;
this.hasLeftPad = true;
this.hasRightPad = true;
this.hasTopPad = true;
this.hasBottomPad = true;
}

@@ -152,2 +176,3 @@ }

this.leftPad = value;
this.hasLeftPad = true;
},

@@ -167,2 +192,3 @@ enumerable: true,

this.rightPad = value;
this.hasRightPad = true;
},

@@ -182,2 +208,3 @@ enumerable: true,

this.topPad = value;
this.hasTopPad = true;
},

@@ -197,2 +224,3 @@ enumerable: true,

this.bottomPad = value;
this.hasBottomPad = true;
},

@@ -209,2 +237,6 @@ enumerable: true,

this.leftPad = this.rightPad = this.topPad = this.bottomPad = value;
this.hasLeftPad = true;
this.hasRightPad = true;
this.hasTopPad = true;
this.hasBottomPad = true;
},

@@ -211,0 +243,0 @@ enumerable: true,

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

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