@progress/kendo-angular-pdf-export 21.4.1 → 22.0.0
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.
- package/fesm2022/progress-kendo-angular-pdf-export.mjs +16 -16
- package/package.json +8 -16
- package/esm2022/compile-template.mjs +0 -25
- package/esm2022/directives.mjs +0 -29
- package/esm2022/index.mjs +0 -10
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/pdf-export-margin.component.mjs +0 -80
- package/esm2022/pdf-export-template.directive.mjs +0 -35
- package/esm2022/pdf-export.component.mjs +0 -310
- package/esm2022/pdf-export.module.mjs +0 -41
- package/esm2022/progress-kendo-angular-pdf-export.mjs +0 -8
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Directive,
|
|
6
|
+
import { Optional, Directive, Input, Component, ContentChild, NgModule } from '@angular/core';
|
|
7
7
|
import { drawDOM, exportPDF } from '@progress/kendo-drawing';
|
|
8
8
|
import { saveAs } from '@progress/kendo-file-saver';
|
|
9
9
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
@@ -16,8 +16,8 @@ const packageMetadata = {
|
|
|
16
16
|
productName: 'Kendo UI for Angular',
|
|
17
17
|
productCode: 'KENDOUIANGULAR',
|
|
18
18
|
productCodes: ['KENDOUIANGULAR'],
|
|
19
|
-
publishDate:
|
|
20
|
-
version: '
|
|
19
|
+
publishDate: 1768402366,
|
|
20
|
+
version: '22.0.0',
|
|
21
21
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
22
22
|
};
|
|
23
23
|
|
|
@@ -38,10 +38,10 @@ class PDFExportTemplateDirective {
|
|
|
38
38
|
constructor(templateRef) {
|
|
39
39
|
this.templateRef = templateRef;
|
|
40
40
|
}
|
|
41
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
42
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
41
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFExportTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
42
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: PDFExportTemplateDirective, isStandalone: true, selector: "[kendoPDFTemplate]", ngImport: i0 });
|
|
43
43
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFExportTemplateDirective, decorators: [{
|
|
45
45
|
type: Directive,
|
|
46
46
|
args: [{
|
|
47
47
|
selector: '[kendoPDFTemplate]',
|
|
@@ -106,10 +106,10 @@ class PDFExportMarginComponent {
|
|
|
106
106
|
}
|
|
107
107
|
return options;
|
|
108
108
|
}
|
|
109
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
110
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
109
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
110
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: PDFExportMarginComponent, isStandalone: true, selector: "kendo-pdf-export-margin", inputs: { left: "left", top: "top", right: "right", bottom: "bottom" }, ngImport: i0, template: ``, isInline: true });
|
|
111
111
|
}
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFExportMarginComponent, decorators: [{
|
|
113
113
|
type: Component,
|
|
114
114
|
args: [{
|
|
115
115
|
selector: 'kendo-pdf-export-margin',
|
|
@@ -384,10 +384,10 @@ class PDFExportComponent {
|
|
|
384
384
|
saveDataUri(dataUri, fileName, options) {
|
|
385
385
|
saveAs(dataUri, fileName, options);
|
|
386
386
|
}
|
|
387
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
388
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
387
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFExportComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
388
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: PDFExportComponent, isStandalone: true, selector: "kendo-pdf-export", inputs: { autoPrint: "autoPrint", author: "author", avoidLinks: "avoidLinks", forcePageBreak: "forcePageBreak", keepTogether: "keepTogether", creator: "creator", date: "date", imageResolution: "imageResolution", fileName: "fileName", forceProxy: "forceProxy", keywords: "keywords", landscape: "landscape", margin: "margin", paperSize: "paperSize", repeatHeaders: "repeatHeaders", scale: "scale", proxyData: "proxyData", proxyURL: "proxyURL", proxyTarget: "proxyTarget", producer: "producer", subject: "subject", title: "title" }, queries: [{ propertyName: "pageTemplateDirective", first: true, predicate: PDFExportTemplateDirective, descendants: true }, { propertyName: "marginComponent", first: true, predicate: PDFExportMarginComponent, descendants: true }], ngImport: i0, template: `<div><ng-content></ng-content></div>`, isInline: true });
|
|
389
389
|
}
|
|
390
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFExportComponent, decorators: [{
|
|
391
391
|
type: Component,
|
|
392
392
|
args: [{
|
|
393
393
|
selector: 'kendo-pdf-export',
|
|
@@ -489,11 +489,11 @@ const KENDO_PDFEXPORT = [
|
|
|
489
489
|
* ```
|
|
490
490
|
*/
|
|
491
491
|
class PDFExportModule {
|
|
492
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
493
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
494
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
492
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
493
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: PDFExportModule, imports: [PDFExportComponent, PDFExportMarginComponent, PDFExportTemplateDirective], exports: [PDFExportComponent, PDFExportMarginComponent, PDFExportTemplateDirective] });
|
|
494
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFExportModule });
|
|
495
495
|
}
|
|
496
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFExportModule, decorators: [{
|
|
497
497
|
type: NgModule,
|
|
498
498
|
args: [{
|
|
499
499
|
imports: [...KENDO_PDFEXPORT],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-pdf-export",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"description": "Kendo UI for Angular PDF Export Component",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -13,27 +13,21 @@
|
|
|
13
13
|
"Kendo UI"
|
|
14
14
|
],
|
|
15
15
|
"@progress": {
|
|
16
|
-
"friendlyName": "PDFExport"
|
|
17
|
-
"package": {
|
|
18
|
-
"productName": "Kendo UI for Angular",
|
|
19
|
-
"productCode": "KENDOUIANGULAR",
|
|
20
|
-
"publishDate": 1768393128,
|
|
21
|
-
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
22
|
-
}
|
|
16
|
+
"friendlyName": "PDFExport"
|
|
23
17
|
},
|
|
24
18
|
"peerDependencies": {
|
|
25
|
-
"@angular/animations": "
|
|
26
|
-
"@angular/common": "
|
|
27
|
-
"@angular/core": "
|
|
28
|
-
"@angular/platform-browser": "
|
|
19
|
+
"@angular/animations": "19 - 21",
|
|
20
|
+
"@angular/common": "19 - 21",
|
|
21
|
+
"@angular/core": "19 - 21",
|
|
22
|
+
"@angular/platform-browser": "19 - 21",
|
|
29
23
|
"@progress/kendo-drawing": "^1.23.1",
|
|
30
24
|
"@progress/kendo-licensing": "^1.7.0",
|
|
31
|
-
"@progress/kendo-angular-common": "
|
|
25
|
+
"@progress/kendo-angular-common": "22.0.0",
|
|
32
26
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
33
27
|
},
|
|
34
28
|
"dependencies": {
|
|
35
29
|
"tslib": "^2.3.1",
|
|
36
|
-
"@progress/kendo-angular-schematics": "
|
|
30
|
+
"@progress/kendo-angular-schematics": "22.0.0",
|
|
37
31
|
"@progress/kendo-file-saver": "^1.0.1"
|
|
38
32
|
},
|
|
39
33
|
"schematics": "./schematics/collection.json",
|
|
@@ -45,8 +39,6 @@
|
|
|
45
39
|
},
|
|
46
40
|
".": {
|
|
47
41
|
"types": "./index.d.ts",
|
|
48
|
-
"esm2022": "./esm2022/progress-kendo-angular-pdf-export.mjs",
|
|
49
|
-
"esm": "./esm2022/progress-kendo-angular-pdf-export.mjs",
|
|
50
42
|
"default": "./fesm2022/progress-kendo-angular-pdf-export.mjs"
|
|
51
43
|
}
|
|
52
44
|
},
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export const compileTemplate = (templateRef) => {
|
|
9
|
-
const context = {};
|
|
10
|
-
let embeddedView = templateRef.createEmbeddedView(context);
|
|
11
|
-
const result = (data) => {
|
|
12
|
-
Object.assign(context, data);
|
|
13
|
-
embeddedView.detectChanges();
|
|
14
|
-
const templateWrap = document.createElement('span');
|
|
15
|
-
embeddedView.rootNodes.forEach((rootNode) => {
|
|
16
|
-
templateWrap.appendChild(rootNode.cloneNode(true));
|
|
17
|
-
});
|
|
18
|
-
return templateWrap;
|
|
19
|
-
};
|
|
20
|
-
result.destroy = () => {
|
|
21
|
-
embeddedView.destroy();
|
|
22
|
-
embeddedView = null;
|
|
23
|
-
};
|
|
24
|
-
return result;
|
|
25
|
-
};
|
package/esm2022/directives.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PDFExportMarginComponent } from "./pdf-export-margin.component";
|
|
6
|
-
import { PDFExportTemplateDirective } from "./pdf-export-template.directive";
|
|
7
|
-
import { PDFExportComponent } from "./pdf-export.component";
|
|
8
|
-
/**
|
|
9
|
-
* Use the `KENDO_PDFEXPORT` utility array to add all `@progress/kendo-angular-pdf-export`-related components and directives to a standalone Angular component.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```typescript
|
|
13
|
-
* import { Component } from '@angular/core';
|
|
14
|
-
* import { KENDO_PDFEXPORT } from "@progress/kendo-angular-pdf-export";
|
|
15
|
-
*
|
|
16
|
-
* @Component({
|
|
17
|
-
* standalone: true,
|
|
18
|
-
* imports: [KENDO_PDFEXPORT],
|
|
19
|
-
* selector: 'my-app',
|
|
20
|
-
* template: `<kendo-pdf-export></kendo-pdf-export>`
|
|
21
|
-
* })
|
|
22
|
-
* export class AppComponent {}
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export const KENDO_PDFEXPORT = [
|
|
26
|
-
PDFExportComponent,
|
|
27
|
-
PDFExportMarginComponent,
|
|
28
|
-
PDFExportTemplateDirective
|
|
29
|
-
];
|
package/esm2022/index.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export { PDFExportComponent } from './pdf-export.component';
|
|
6
|
-
export { PDFExportModule } from './pdf-export.module';
|
|
7
|
-
export { PDFExportMarginComponent } from './pdf-export-margin.component';
|
|
8
|
-
export { PDFExportTemplateDirective } from './pdf-export-template.directive';
|
|
9
|
-
export { compileTemplate } from './compile-template';
|
|
10
|
-
export * from './directives';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export const packageMetadata = {
|
|
9
|
-
name: '@progress/kendo-angular-pdf-export',
|
|
10
|
-
productName: 'Kendo UI for Angular',
|
|
11
|
-
productCode: 'KENDOUIANGULAR',
|
|
12
|
-
productCodes: ['KENDOUIANGULAR'],
|
|
13
|
-
publishDate: 1768393128,
|
|
14
|
-
version: '21.4.1',
|
|
15
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, Input } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
const FIELDS = ['bottom', 'left', 'right', 'top'];
|
|
8
|
-
/**
|
|
9
|
-
* Represents the Kendo UI PDFMargin component for Angular.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```html
|
|
13
|
-
* <kendo-pdf-export paperSize="A4">
|
|
14
|
-
* <kendo-pdf-export-margin top="2cm" left="1cm" right="1cm" bottom="2cm">
|
|
15
|
-
* </kendo-pdf-export-margin>
|
|
16
|
-
* </kendo-pdf-export>
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export class PDFExportMarginComponent {
|
|
20
|
-
/**
|
|
21
|
-
* Sets the left margin of the PDF page. Accepts a `number` or `string` value.
|
|
22
|
-
*
|
|
23
|
-
* The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`. Numbers use points (`"pt"`).
|
|
24
|
-
* @default "pt"
|
|
25
|
-
*/
|
|
26
|
-
left;
|
|
27
|
-
/**
|
|
28
|
-
* Sets the top margin of the PDF page. Accepts a `number` or `string` value.
|
|
29
|
-
*
|
|
30
|
-
* The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`. Numbers use points (`"pt"`).
|
|
31
|
-
* @default "pt"
|
|
32
|
-
*/
|
|
33
|
-
top;
|
|
34
|
-
/**
|
|
35
|
-
* Sets the right margin of the PDF page. Accepts a `number` or `string` value.
|
|
36
|
-
*
|
|
37
|
-
* The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`. Numbers use points (`"pt"`).
|
|
38
|
-
* @default "pt"
|
|
39
|
-
*/
|
|
40
|
-
right;
|
|
41
|
-
/**
|
|
42
|
-
* Sets the bottom margin of the PDF page. Accepts a `number` or `string` value.
|
|
43
|
-
*
|
|
44
|
-
* The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`. Numbers use points (`"pt"`).
|
|
45
|
-
* @default "pt"
|
|
46
|
-
*/
|
|
47
|
-
bottom;
|
|
48
|
-
/**
|
|
49
|
-
* @hidden
|
|
50
|
-
*/
|
|
51
|
-
get options() {
|
|
52
|
-
const options = {};
|
|
53
|
-
for (let idx = 0; idx < FIELDS.length; idx++) {
|
|
54
|
-
const field = FIELDS[idx];
|
|
55
|
-
const value = this[field];
|
|
56
|
-
if (typeof value !== 'undefined') {
|
|
57
|
-
options[field] = value;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return options;
|
|
61
|
-
}
|
|
62
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
63
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: PDFExportMarginComponent, isStandalone: true, selector: "kendo-pdf-export-margin", inputs: { left: "left", top: "top", right: "right", bottom: "bottom" }, ngImport: i0, template: ``, isInline: true });
|
|
64
|
-
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFExportMarginComponent, decorators: [{
|
|
66
|
-
type: Component,
|
|
67
|
-
args: [{
|
|
68
|
-
selector: 'kendo-pdf-export-margin',
|
|
69
|
-
template: ``,
|
|
70
|
-
standalone: true
|
|
71
|
-
}]
|
|
72
|
-
}], propDecorators: { left: [{
|
|
73
|
-
type: Input
|
|
74
|
-
}], top: [{
|
|
75
|
-
type: Input
|
|
76
|
-
}], right: [{
|
|
77
|
-
type: Input
|
|
78
|
-
}], bottom: [{
|
|
79
|
-
type: Input
|
|
80
|
-
}] } });
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, Optional, TemplateRef } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Represents the directive for defining a custom page template in the PDF Export component ([see example](slug:multipagecontent_pdfexport#page-templates)).
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```html
|
|
12
|
-
* <kendo-pdf-export paperSize="A4" margin="2cm">
|
|
13
|
-
* <ng-template kendoPDFTemplate let-pageNum="pageNum">
|
|
14
|
-
* <div>Page {{ pageNum }}</div>
|
|
15
|
-
* </ng-template>
|
|
16
|
-
* </kendo-pdf-export>
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export class PDFExportTemplateDirective {
|
|
20
|
-
templateRef;
|
|
21
|
-
constructor(templateRef) {
|
|
22
|
-
this.templateRef = templateRef;
|
|
23
|
-
}
|
|
24
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFExportTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
25
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: PDFExportTemplateDirective, isStandalone: true, selector: "[kendoPDFTemplate]", ngImport: i0 });
|
|
26
|
-
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFExportTemplateDirective, decorators: [{
|
|
28
|
-
type: Directive,
|
|
29
|
-
args: [{
|
|
30
|
-
selector: '[kendoPDFTemplate]',
|
|
31
|
-
standalone: true
|
|
32
|
-
}]
|
|
33
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
|
|
34
|
-
type: Optional
|
|
35
|
-
}] }] });
|
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, ContentChild, ElementRef, Input } from '@angular/core';
|
|
6
|
-
import { drawDOM, exportPDF } from '@progress/kendo-drawing';
|
|
7
|
-
import { saveAs } from '@progress/kendo-file-saver';
|
|
8
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
9
|
-
import { packageMetadata } from './package-metadata';
|
|
10
|
-
import { PDFExportTemplateDirective } from './pdf-export-template.directive';
|
|
11
|
-
import { PDFExportMarginComponent } from './pdf-export-margin.component';
|
|
12
|
-
import { compileTemplate } from './compile-template';
|
|
13
|
-
import * as i0 from "@angular/core";
|
|
14
|
-
/**
|
|
15
|
-
* Represents the [Kendo UI PDF Export component for Angular](slug:overview_pdfexport).
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```html
|
|
19
|
-
* <button kendoButton (click)="pdf.saveAs('document.pdf')">
|
|
20
|
-
* Save As PDF...
|
|
21
|
-
* </button>
|
|
22
|
-
*
|
|
23
|
-
* <kendo-pdf-export #pdf paperSize="A4" margin="2cm">
|
|
24
|
-
* Content goes here
|
|
25
|
-
* </kendo-pdf-export>
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @remarks
|
|
29
|
-
* Supported children components are: {@link PDFExportMarginComponent}
|
|
30
|
-
*/
|
|
31
|
-
export class PDFExportComponent {
|
|
32
|
-
element;
|
|
33
|
-
/**
|
|
34
|
-
* If `true`, opens the Print dialog immediately after the PDF loads ([see example](slug:autoprint_pdfexport)).
|
|
35
|
-
* Requires `@progress/kendo-drawing` v1.9.0 or later.
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
autoPrint;
|
|
39
|
-
/**
|
|
40
|
-
* Sets the author metadata for the PDF document.
|
|
41
|
-
*/
|
|
42
|
-
author;
|
|
43
|
-
/**
|
|
44
|
-
* Specifies whether actual hyperlinks will be produced in the exported PDF file ([see example](slug:hyperlinks_pdfexport)). You can also set a CSS selector to ignore matching links.
|
|
45
|
-
*/
|
|
46
|
-
avoidLinks;
|
|
47
|
-
/**
|
|
48
|
-
* Sets a CSS selector for elements that cause page breaks
|
|
49
|
-
* ([see example](slug:multipagecontent_pdfexport#toc-manual-page-breaking)).
|
|
50
|
-
*/
|
|
51
|
-
forcePageBreak;
|
|
52
|
-
/**
|
|
53
|
-
* Sets a CSS selector for elements that should not split across pages
|
|
54
|
-
* ([see example](slug:multipagecontent_pdfexport#toc-preventing-page-breaking-in-elements)).
|
|
55
|
-
*/
|
|
56
|
-
keepTogether;
|
|
57
|
-
/**
|
|
58
|
-
* Sets the creator metadata for the PDF document.
|
|
59
|
-
* @default "Kendo UI PDF Generator"
|
|
60
|
-
*/
|
|
61
|
-
creator = 'Kendo UI PDF Generator';
|
|
62
|
-
/**
|
|
63
|
-
* Sets the creation date for the PDF document. Defaults to `new Date()`.
|
|
64
|
-
* @default new Date()
|
|
65
|
-
*/
|
|
66
|
-
date;
|
|
67
|
-
/**
|
|
68
|
-
* Sets the image resolution in the exported PDF ([see example](slug:embeddedimages_pdfexport)). By default, images use full resolution.
|
|
69
|
-
*/
|
|
70
|
-
imageResolution;
|
|
71
|
-
/**
|
|
72
|
-
* Sets the name of the exported PDF file.
|
|
73
|
-
* @default "export.pdf"
|
|
74
|
-
*/
|
|
75
|
-
fileName = 'export.pdf';
|
|
76
|
-
/**
|
|
77
|
-
* If `true`, forwards content to `proxyURL` even if the browser supports local file saving.
|
|
78
|
-
*/
|
|
79
|
-
forceProxy;
|
|
80
|
-
/**
|
|
81
|
-
* Sets the keywords metadata for the PDF document.
|
|
82
|
-
*/
|
|
83
|
-
keywords;
|
|
84
|
-
/**
|
|
85
|
-
* If `true`, sets the page orientation to landscape. The default page orientation is portrait.
|
|
86
|
-
* @default false
|
|
87
|
-
*/
|
|
88
|
-
landscape;
|
|
89
|
-
/**
|
|
90
|
-
* Sets the page margins. Numbers use points (`"pt"`).
|
|
91
|
-
*/
|
|
92
|
-
margin;
|
|
93
|
-
/**
|
|
94
|
-
* Sets the paper size for the PDF document. Defaults to `"auto"`, which means the content determines the size of the document.
|
|
95
|
-
* The size of the content in pixels matches the size of the output in points (1 pixel = 1/72 inch).
|
|
96
|
-
*
|
|
97
|
-
* If set, the content splits across pages, and allows you to use `repeatHeaders`, `scale`, and a template.
|
|
98
|
-
*
|
|
99
|
-
* The value can be a `PaperSize`, an array of two numbers (width and height in points), or an array of two strings (width and height in units: `"mm"`, `"cm"`, `"in"`, or `"pt"`).
|
|
100
|
-
* @default "auto"
|
|
101
|
-
*/
|
|
102
|
-
paperSize;
|
|
103
|
-
/**
|
|
104
|
-
* If `true`, repeats the `<thead>` elements of tables on each page. This helps keep table headers visible on every page
|
|
105
|
-
* ([see example](slug:recurrenttableheaders_pdfexport)).
|
|
106
|
-
*/
|
|
107
|
-
repeatHeaders;
|
|
108
|
-
/**
|
|
109
|
-
* Sets a scale factor for the PDF output. Use this to make the PDF content smaller or larger
|
|
110
|
-
* ([see example](slug:scalingofcontent_pdfexport)).
|
|
111
|
-
*
|
|
112
|
-
* @default 1
|
|
113
|
-
*/
|
|
114
|
-
scale;
|
|
115
|
-
/**
|
|
116
|
-
* Sets a key/value dictionary of form values sent to the proxy. Use this to send extra data, like Anti-Forgery tokens.
|
|
117
|
-
*/
|
|
118
|
-
proxyData;
|
|
119
|
-
/**
|
|
120
|
-
* Sets the server-side proxy URL for streaming the file to the user. You need to implement a proxy if
|
|
121
|
-
* the browser is not capable of saving files locally.
|
|
122
|
-
* The proxy returns the decoded file with the `"Content-Disposition"` header set to `attachment; filename="<fileName.pdf>"`.
|
|
123
|
-
*
|
|
124
|
-
* In the request body, the proxy receives a POST request with the specific parameters
|
|
125
|
-
* ([see example](slug:server_proxy#toc-implementations)).
|
|
126
|
-
*/
|
|
127
|
-
proxyURL;
|
|
128
|
-
/**
|
|
129
|
-
* Sets where to display the document returned from the proxy. Use `"_self"` to display in the same window.
|
|
130
|
-
* To display the document in a new window or iframe,
|
|
131
|
-
* the proxy must have the `"Content-Disposition"` header set to `inline; filename="<fileName.pdf>"`.
|
|
132
|
-
* @default "_self"
|
|
133
|
-
*/
|
|
134
|
-
proxyTarget;
|
|
135
|
-
/**
|
|
136
|
-
* Sets the producer metadata for the PDF document.
|
|
137
|
-
*/
|
|
138
|
-
producer;
|
|
139
|
-
/**
|
|
140
|
-
* Sets the subject metadata for the PDF document.
|
|
141
|
-
*/
|
|
142
|
-
subject;
|
|
143
|
-
/**
|
|
144
|
-
* Sets the title metadata for the PDF document.
|
|
145
|
-
*/
|
|
146
|
-
title;
|
|
147
|
-
/**
|
|
148
|
-
* @hidden
|
|
149
|
-
*/
|
|
150
|
-
pageTemplateDirective;
|
|
151
|
-
/**
|
|
152
|
-
* @hidden
|
|
153
|
-
*/
|
|
154
|
-
marginComponent;
|
|
155
|
-
get drawMargin() {
|
|
156
|
-
const marginComponent = this.marginComponent;
|
|
157
|
-
let margin = this.margin;
|
|
158
|
-
if (marginComponent) {
|
|
159
|
-
margin = Object.assign(margin || {}, marginComponent.options);
|
|
160
|
-
}
|
|
161
|
-
return margin;
|
|
162
|
-
}
|
|
163
|
-
pageTemplate;
|
|
164
|
-
constructor(element) {
|
|
165
|
-
this.element = element;
|
|
166
|
-
validatePackage(packageMetadata);
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Saves the content as a PDF file with the specified name.
|
|
170
|
-
* @param fileName - The name of the exported file.
|
|
171
|
-
*/
|
|
172
|
-
saveAs(fileName = this.fileName) {
|
|
173
|
-
this.save(this.element.nativeElement, fileName);
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Exports the content as a `Group` for further processing.
|
|
177
|
-
*
|
|
178
|
-
* @return The root group of the exported scene.
|
|
179
|
-
*/
|
|
180
|
-
export() {
|
|
181
|
-
return this.exportElement(this.element.nativeElement);
|
|
182
|
-
}
|
|
183
|
-
save(element, fileName) {
|
|
184
|
-
this.exportElement(element)
|
|
185
|
-
.then(group => this.exportGroup(group, this.pdfOptions()))
|
|
186
|
-
.then(dataUri => this.saveDataUri(dataUri, fileName, this.saveOptions()));
|
|
187
|
-
}
|
|
188
|
-
exportElement(element) {
|
|
189
|
-
const promise = this.drawElement(element, this.drawOptions());
|
|
190
|
-
const cleanup = this.cleanup.bind(this);
|
|
191
|
-
promise.then(cleanup, cleanup);
|
|
192
|
-
return promise;
|
|
193
|
-
}
|
|
194
|
-
cleanup() {
|
|
195
|
-
if (this.pageTemplate) {
|
|
196
|
-
this.pageTemplate.destroy();
|
|
197
|
-
delete this.pageTemplate;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
drawOptions() {
|
|
201
|
-
if (this.pageTemplateDirective) {
|
|
202
|
-
this.pageTemplate = compileTemplate(this.pageTemplateDirective.templateRef);
|
|
203
|
-
}
|
|
204
|
-
return {
|
|
205
|
-
avoidLinks: this.avoidLinks,
|
|
206
|
-
forcePageBreak: this.forcePageBreak,
|
|
207
|
-
keepTogether: this.keepTogether,
|
|
208
|
-
margin: this.drawMargin,
|
|
209
|
-
paperSize: this.paperSize,
|
|
210
|
-
landscape: this.landscape,
|
|
211
|
-
repeatHeaders: this.repeatHeaders,
|
|
212
|
-
scale: this.scale,
|
|
213
|
-
template: this.pageTemplate
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
pdfOptions() {
|
|
217
|
-
return {
|
|
218
|
-
autoPrint: this.autoPrint,
|
|
219
|
-
author: this.author,
|
|
220
|
-
creator: this.creator,
|
|
221
|
-
date: this.date,
|
|
222
|
-
imgDPI: this.imageResolution,
|
|
223
|
-
keywords: this.keywords,
|
|
224
|
-
landscape: this.landscape,
|
|
225
|
-
margin: this.drawMargin,
|
|
226
|
-
multiPage: true,
|
|
227
|
-
paperSize: this.paperSize,
|
|
228
|
-
producer: this.producer,
|
|
229
|
-
subject: this.subject,
|
|
230
|
-
title: this.title
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
saveOptions() {
|
|
234
|
-
return {
|
|
235
|
-
forceProxy: this.forceProxy,
|
|
236
|
-
proxyData: this.proxyData,
|
|
237
|
-
proxyTarget: this.proxyTarget,
|
|
238
|
-
proxyURL: this.proxyURL
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
drawElement(element, options) {
|
|
242
|
-
return drawDOM(element, options);
|
|
243
|
-
}
|
|
244
|
-
exportGroup(group, options) {
|
|
245
|
-
return exportPDF(group, options);
|
|
246
|
-
}
|
|
247
|
-
saveDataUri(dataUri, fileName, options) {
|
|
248
|
-
saveAs(dataUri, fileName, options);
|
|
249
|
-
}
|
|
250
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFExportComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
251
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: PDFExportComponent, isStandalone: true, selector: "kendo-pdf-export", inputs: { autoPrint: "autoPrint", author: "author", avoidLinks: "avoidLinks", forcePageBreak: "forcePageBreak", keepTogether: "keepTogether", creator: "creator", date: "date", imageResolution: "imageResolution", fileName: "fileName", forceProxy: "forceProxy", keywords: "keywords", landscape: "landscape", margin: "margin", paperSize: "paperSize", repeatHeaders: "repeatHeaders", scale: "scale", proxyData: "proxyData", proxyURL: "proxyURL", proxyTarget: "proxyTarget", producer: "producer", subject: "subject", title: "title" }, queries: [{ propertyName: "pageTemplateDirective", first: true, predicate: PDFExportTemplateDirective, descendants: true }, { propertyName: "marginComponent", first: true, predicate: PDFExportMarginComponent, descendants: true }], ngImport: i0, template: `<div><ng-content></ng-content></div>`, isInline: true });
|
|
252
|
-
}
|
|
253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFExportComponent, decorators: [{
|
|
254
|
-
type: Component,
|
|
255
|
-
args: [{
|
|
256
|
-
selector: 'kendo-pdf-export',
|
|
257
|
-
template: `<div><ng-content></ng-content></div>`,
|
|
258
|
-
standalone: true
|
|
259
|
-
}]
|
|
260
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { autoPrint: [{
|
|
261
|
-
type: Input
|
|
262
|
-
}], author: [{
|
|
263
|
-
type: Input
|
|
264
|
-
}], avoidLinks: [{
|
|
265
|
-
type: Input
|
|
266
|
-
}], forcePageBreak: [{
|
|
267
|
-
type: Input
|
|
268
|
-
}], keepTogether: [{
|
|
269
|
-
type: Input
|
|
270
|
-
}], creator: [{
|
|
271
|
-
type: Input
|
|
272
|
-
}], date: [{
|
|
273
|
-
type: Input
|
|
274
|
-
}], imageResolution: [{
|
|
275
|
-
type: Input
|
|
276
|
-
}], fileName: [{
|
|
277
|
-
type: Input
|
|
278
|
-
}], forceProxy: [{
|
|
279
|
-
type: Input
|
|
280
|
-
}], keywords: [{
|
|
281
|
-
type: Input
|
|
282
|
-
}], landscape: [{
|
|
283
|
-
type: Input
|
|
284
|
-
}], margin: [{
|
|
285
|
-
type: Input
|
|
286
|
-
}], paperSize: [{
|
|
287
|
-
type: Input
|
|
288
|
-
}], repeatHeaders: [{
|
|
289
|
-
type: Input
|
|
290
|
-
}], scale: [{
|
|
291
|
-
type: Input
|
|
292
|
-
}], proxyData: [{
|
|
293
|
-
type: Input
|
|
294
|
-
}], proxyURL: [{
|
|
295
|
-
type: Input
|
|
296
|
-
}], proxyTarget: [{
|
|
297
|
-
type: Input
|
|
298
|
-
}], producer: [{
|
|
299
|
-
type: Input
|
|
300
|
-
}], subject: [{
|
|
301
|
-
type: Input
|
|
302
|
-
}], title: [{
|
|
303
|
-
type: Input
|
|
304
|
-
}], pageTemplateDirective: [{
|
|
305
|
-
type: ContentChild,
|
|
306
|
-
args: [PDFExportTemplateDirective, { static: false }]
|
|
307
|
-
}], marginComponent: [{
|
|
308
|
-
type: ContentChild,
|
|
309
|
-
args: [PDFExportMarginComponent, { static: false }]
|
|
310
|
-
}] } });
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { NgModule } from '@angular/core';
|
|
6
|
-
import { KENDO_PDFEXPORT } from './directives';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "./pdf-export.component";
|
|
9
|
-
import * as i2 from "./pdf-export-margin.component";
|
|
10
|
-
import * as i3 from "./pdf-export-template.directive";
|
|
11
|
-
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
12
|
-
/**
|
|
13
|
-
* Represents the [`NgModule`](link:site.data.urls.angular['ngmoduleapi']) definition for the PDF Export component.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* import { NgModule } from '@angular/core';
|
|
18
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
19
|
-
* import { PDFExportModule } from '@progress/kendo-angular-pdf-export';
|
|
20
|
-
* import { AppComponent } from './app.component';
|
|
21
|
-
*
|
|
22
|
-
* @NgModule({
|
|
23
|
-
* declarations: [AppComponent],
|
|
24
|
-
* imports: [BrowserModule, PDFExportModule],
|
|
25
|
-
* bootstrap: [AppComponent]
|
|
26
|
-
* })
|
|
27
|
-
* export class AppModule {}
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export class PDFExportModule {
|
|
31
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
32
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: PDFExportModule, imports: [i1.PDFExportComponent, i2.PDFExportMarginComponent, i3.PDFExportTemplateDirective], exports: [i1.PDFExportComponent, i2.PDFExportMarginComponent, i3.PDFExportTemplateDirective] });
|
|
33
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFExportModule });
|
|
34
|
-
}
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFExportModule, decorators: [{
|
|
36
|
-
type: NgModule,
|
|
37
|
-
args: [{
|
|
38
|
-
imports: [...KENDO_PDFEXPORT],
|
|
39
|
-
exports: [...KENDO_PDFEXPORT]
|
|
40
|
-
}]
|
|
41
|
-
}] });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
8
|
-
export * from './index';
|