@progress/kendo-angular-pdf-export 17.0.0-develop.9 → 17.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/README.md CHANGED
@@ -1,33 +1,45 @@
1
- <a href="https://www.telerik.com/kendo-angular-ui/" target="_blank">
1
+ <a href="https://www.telerik.com/kendo-angular-ui/components/pdf-export" target="_blank">
2
2
  <img width="631" src="https://www.telerik.com/kendo-angular-ui/npm-banner.svg">
3
3
  </a>
4
4
 
5
- ## Kendo UI for Angular PDF Processing Component
5
+ ## Kendo UI for Angular PDF Export Component
6
6
 
7
- > **Important**
8
- > * This package is part of [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-pdf)&mdash;a commercial library.
9
- > * You will need to install a license key when adding the package to your project. For more information, please refer to the [Kendo UI for Angular My License page](https://www.telerik.com/kendo-angular-ui/my-license?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-pdf).
10
- > * To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-pdf) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-pdf). Doing so indicates that you [accept the Kendo UI for Angular License Agreement](https://www.telerik.com/purchase/license-agreement/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-pdf).
11
- > * The 30-day free trial gives you access to all the Kendo UI for Angular components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Angular dev team!
12
- >
13
- > [Start using Kendo UI for Angular](https://www.telerik.com/download-login-v2-kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-pdf) and speed up your development process!
7
+ > * This package is part of the [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/)&mdash;a commercial UI library.
8
+ > * You must [install a license key](https://www.telerik.com/kendo-angular-ui/my-license) when adding the package to your project. To receive a license key, either [purchase a license](https://www.telerik.com/purchase/kendo-ui) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui).
9
+ > * The 30-day free trial gives you access to all the Kendo UI for Angular components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Angular team!
14
10
 
15
- Kendo UI for Angular is a commercial UI library designed and built for developing business applications with Angular. Every UI component in the Kendo UI for Angular suite has been built from the ground-up specifically for Angular.
11
+ The Kendo UI for Angular PDF Export component allows you to export any content to a PDF document. The PDF Export is built from the ground up and specifically for Angular, so that you get a high-performance control which integrates tightly with your application and with the rest of the Kendo UI for Angular components.
12
+
13
+ ## Key Features
14
+
15
+ Among the many features which the Kendo UI for Angular PDF Export delivers are:
16
+
17
+ * Embedded Fonts&mdash;The PDF Export component allows you to embed specific fonts in the exported PDF document to match the content appearance in the browser. [Read more about the embedded fonts functionality of the PDF Export...](https://www.telerik.com/kendo-angular-ui/components/pdf-export/embedded-fonts)
18
+ * Image Resolution&mdash;You can also limit the image resolution of the embedded images and SVG documents in the file exported by the PDF Export component. [Read more about the image resolution functionality of the PDF Export...](https://www.telerik.com/kendo-angular-ui/components/pdf-export/embedded-images)
19
+ * Disabling Hyperlinks&mdash;The PDF Export component provides an option for disabling the exported hyperlinks in the generated PDF document. [Read more about the disabling hyperlinks functionality of the PDF Export...](https://www.telerik.com/kendo-angular-ui/components/pdf-export/hyperlinks)
20
+ * Scaling of Content&mdash;Furthermore, you can scale the content of the PDF document that was generated by the PDF Export component. [Read more about the scaling of content functionality of the PDF Export...](https://www.telerik.com/kendo-angular-ui/components/pdf-export/content-scaling)
21
+ * Repeated Table Headers&mdash;The PDF Export component enables you to render recurrent table headers on each page. [Read more about the repeated table headers functionality of the PDF Export...](https://www.telerik.com/kendo-angular-ui/components/pdf-export/table-headers)
22
+ * Multi-Page Content&mdash;The PDF Export component provides a number of options for managing the generated multi-page content in PDF such as preventing the page-split, specifying page templates, and more. [Read more about the multi-page content functionality of the PDF Export...](https://www.telerik.com/kendo-angular-ui/components/pdf-export/multi-page-content)
23
+ * Hidden Content&mdash;With the PDF Export component you can generate PDF content, which is otherwise not visible to the user during the PDF export itself&mdash;for example, company logos, contact details, and more. [Read more about the hidden content functionality of the PDF Export...](https://www.telerik.com/kendo-angular-ui/components/pdf-export/hidden-content)
24
+ * Styling of ContentThe PDF Export delivers a number of settings for styling only the exported content in the generated PDF document. [Read more about the styling of content functionality of the PDF Export...](https://www.telerik.com/kendo-angular-ui/components/pdf-export/content-styling)
25
+ * Auto-Print&mdash;When using the PDF Export component, you can set the exported PDF files to open a **Print** dialog immediately after they are opened. [Read more about the auto-print functionality of the PDF Export...](https://www.telerik.com/kendo-angular-ui/components/pdf-export/auto-print)
26
+
27
+ ## Support Options
28
+
29
+ For any issues you might encounter while working with the Kendo UI for Angular PDF Export, you have the following support channels available:
30
+
31
+ * Industry-leading technical support&mdash;Kendo UI for Angular paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use the [dedicated Kendo UI for Angular support system](https://www.telerik.com/account/support-center/contact-us/technical-support).
32
+ * Product forums&mdash;The [Kendo UI for Angular forums](https://www.telerik.com/forums/kendo-angular-ui) are part of the free support you can get from the community and from the Kendo UI for Angular team.
33
+ * Feedback portal&mdash;The [Kendo UI for Angular feedback portal](https://feedback.telerik.com/kendo-angular-ui) is where you can request and vote for new features to be added.
16
34
 
17
35
  ## Resources
18
36
 
19
- * [Get Started with Kendo UI for Angular (requires trial registration)](https://www.telerik.com/kendo-angular-ui/getting-started)
37
+ * [Getting Started with Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/getting-started)
38
+ * [Getting Started with the Kendo UI for Angular PDF Export](https://www.telerik.com/kendo-angular-ui/components/pdf-export/installation/getting-started)
20
39
  * [Demos, documentation, and component reference](https://www.telerik.com/kendo-angular-ui/components)
21
40
  * [Blogs](http://www.telerik.com/blogs/kendo-ui)
22
41
  * [Kendo UI for Angular pricing and licensing](https://www.telerik.com/purchase/kendo-ui)
23
42
 
24
- ## Questions and Feedback
25
-
26
- * [Official Forums](https://www.telerik.com/forums/kendo-angular-ui)
27
- * [GitHub Issues](https://github.com/telerik/kendo-angular/issues)
28
- * [Feedback Portal](https://feedback.telerik.com/kendo-angular-ui)
29
- * [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2)
30
-
31
43
  *Copyright © 2024 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
32
44
 
33
45
  *Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-pdf-export',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1729174399,
13
- version: '17.0.0-develop.9',
12
+ publishDate: 1731413960,
13
+ version: '17.0.0',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -9,6 +9,26 @@ const FIELDS = ['bottom', 'left', 'right', 'top'];
9
9
  * Represents the Kendo UI PDFMargin component for Angular.
10
10
  */
11
11
  export class PDFExportMarginComponent {
12
+ /**
13
+ * The bottom margin. The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"` (default).
14
+ * Numbers are considered to be points (`"pt"`).
15
+ */
16
+ left;
17
+ /**
18
+ * The top margin. The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"` (default).
19
+ * Numbers are considered to be points (`"pt"`).
20
+ */
21
+ top;
22
+ /**
23
+ * The right margin. The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"` (default).
24
+ * Numbers are considered to be points (`"pt"`).
25
+ */
26
+ right;
27
+ /**
28
+ * The bottom margin. The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"` (default).
29
+ * Numbers are considered to be points (`"pt"`).
30
+ */
31
+ bottom;
12
32
  /**
13
33
  * @hidden
14
34
  */
@@ -23,10 +43,10 @@ export class PDFExportMarginComponent {
23
43
  }
24
44
  return options;
25
45
  }
46
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
47
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PDFExportMarginComponent, isStandalone: true, selector: "kendo-pdf-export-margin", inputs: { left: "left", top: "top", right: "right", bottom: "bottom" }, ngImport: i0, template: ``, isInline: true });
26
48
  }
27
- PDFExportMarginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
28
- PDFExportMarginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PDFExportMarginComponent, isStandalone: true, selector: "kendo-pdf-export-margin", inputs: { left: "left", top: "top", right: "right", bottom: "bottom" }, ngImport: i0, template: ``, isInline: true });
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportMarginComponent, decorators: [{
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportMarginComponent, decorators: [{
30
50
  type: Component,
31
51
  args: [{
32
52
  selector: 'kendo-pdf-export-margin',
@@ -5,13 +5,14 @@
5
5
  import { Directive, Optional, TemplateRef } from '@angular/core';
6
6
  import * as i0 from "@angular/core";
7
7
  export class PDFExportTemplateDirective {
8
+ templateRef;
8
9
  constructor(templateRef) {
9
10
  this.templateRef = templateRef;
10
11
  }
12
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
13
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PDFExportTemplateDirective, isStandalone: true, selector: "[kendoPDFTemplate]", ngImport: i0 });
11
14
  }
12
- PDFExportTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
13
- PDFExportTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PDFExportTemplateDirective, isStandalone: true, selector: "[kendoPDFTemplate]", ngImport: i0 });
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportTemplateDirective, decorators: [{
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportTemplateDirective, decorators: [{
15
16
  type: Directive,
16
17
  args: [{
17
18
  selector: '[kendoPDFTemplate]',
@@ -35,20 +35,140 @@ import * as i0 from "@angular/core";
35
35
  * ```
36
36
  */
37
37
  export class PDFExportComponent {
38
- constructor(element) {
39
- this.element = element;
40
- /**
41
- * The creator of the PDF document.
42
- * @default "Kendo UI PDF Generator"
43
- */
44
- this.creator = 'Kendo UI PDF Generator';
45
- /**
46
- * Specifies the name of the exported PDF file.
47
- * @default "export.pdf"
48
- */
49
- this.fileName = 'export.pdf';
50
- validatePackage(packageMetadata);
51
- }
38
+ element;
39
+ /**
40
+ * Specifies if the Print dialog should be opened immediately after loading the document ([see example](slug:autoprint_pdfexport)).
41
+ * Requires `@progress/kendo-drawing` v1.9.0 or later.
42
+ * @default false
43
+ */
44
+ autoPrint;
45
+ /**
46
+ * The author (metadata) of the PDF document.
47
+ */
48
+ author;
49
+ /**
50
+ * A flag that indicates whether to produce actual hyperlinks in the exported PDF file ([see example](slug:hyperlinks_pdfexport)).
51
+ * It is also possible to set a CSS selector. All matching links will be ignored.
52
+ */
53
+ avoidLinks;
54
+ /**
55
+ * An optional CSS selector that specifies the elements which cause the page breaks
56
+ * ([see example]({% slug multipagecontent_pdfexport %}#toc-manual-page-breaking)).
57
+ */
58
+ forcePageBreak;
59
+ /**
60
+ * An optional CSS selector that specifies the elements which should not be split across the pages
61
+ * ([see example]({% slug multipagecontent_pdfexport %}#toc-preventing-page-breaking-in-elements)).
62
+ */
63
+ keepTogether;
64
+ /**
65
+ * The creator of the PDF document.
66
+ * @default "Kendo UI PDF Generator"
67
+ */
68
+ creator = 'Kendo UI PDF Generator';
69
+ /**
70
+ * The date when the PDF document is created. Defaults to `new Date()`.
71
+ */
72
+ date;
73
+ /**
74
+ * The forced resolution of the images in the exported PDF document
75
+ * ([see example]({% slug embeddedimages_pdfexport %})).
76
+ * By default, the images are exported at their full resolution.
77
+ */
78
+ imageResolution;
79
+ /**
80
+ * Specifies the name of the exported PDF file.
81
+ * @default "export.pdf"
82
+ */
83
+ fileName = 'export.pdf';
84
+ /**
85
+ * If set to `true`, the content is forwarded to `proxyURL` even if the
86
+ * browser supports local saving of files.
87
+ */
88
+ forceProxy;
89
+ /**
90
+ * The keywords (metadata) of the PDF document.
91
+ */
92
+ keywords;
93
+ /**
94
+ * A flag that indicates if the page will be in a landscape orientation.
95
+ * By default, the page is in a portrait orientation.
96
+ *
97
+ * @default false
98
+ */
99
+ landscape;
100
+ /**
101
+ * Specifies the margins of the page. Numbers are treated as points (`"pt"`).
102
+ *
103
+ */
104
+ margin;
105
+ /**
106
+ * Specifies the paper size of the PDF document ([see example]({% slug multipagecontent_pdfexport %}#toc-automatic-page-breaking)).
107
+ * Defaults to `"auto"` which means that the paper size is determined by the content.
108
+ * The size of the content in pixels matches the size of the output in points (1 pixel = 1/72 inch).
109
+ * If `paperSize` is set, the content is split across multiple pages. This enables the `repeatHeaders` and
110
+ * `scale` options, and allows you to specify a template.
111
+ *
112
+ * The paper size can be a `PaperSize`, an array of two numbers which specify the width and height in points (1 pt = 1/72 in), or an
113
+ * array of two strings which specify the width and height in units. The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`.
114
+ * @default 'auto'
115
+ */
116
+ paperSize;
117
+ /**
118
+ * Specifies if the `<thead>` elements of the tables will be repeated on each page
119
+ * ([see example]({% slug recurrenttableheaders_pdfexport %})).
120
+ */
121
+ repeatHeaders;
122
+ /**
123
+ * A scale factor ([see example]({% slug scalingofcontent_pdfexport %})).
124
+ * The text size on the screen might be too big for printing.
125
+ * To scale down the output in PDF, use this option.
126
+ *
127
+ * @default 1
128
+ */
129
+ scale;
130
+ /**
131
+ * A key/value dictionary of form values which will be sent to the proxy.
132
+ * Can be used to submit Anti-Forgery tokens and other metadata.
133
+ */
134
+ proxyData;
135
+ /**
136
+ * The URL of the server-side proxy which streams the file to the end user. You need to use a proxy if
137
+ * the browser is not capable of saving files locally.
138
+ * It is your responsibility to implement the server-side proxy. The proxy returns the decoded file with
139
+ * the `"Content-Disposition"` header set to `attachment; filename="<fileName.pdf>"`.
140
+ *
141
+ * In the request body, the proxy receives a POST request with the specific parameters.
142
+ * [See example](slug:server_proxy#toc-implementations).
143
+ */
144
+ proxyURL;
145
+ /**
146
+ * A name or keyword which indicates where to display the document that is returned from the proxy.
147
+ * To display the document in a new window or iframe,
148
+ * the proxy has to have the `"Content-Disposition"` header set to `inline; filename="<fileName.pdf>"`.
149
+ * @default "_self"
150
+ */
151
+ proxyTarget;
152
+ /**
153
+ * The producer (metadata) of the PDF document.
154
+ */
155
+ producer;
156
+ /**
157
+ * The subject (metadata) of the PDF document.
158
+ */
159
+ subject;
160
+ /**
161
+ * The title (metadata) of the PDF document.
162
+ */
163
+ title;
164
+ /**
165
+ * @hidden
166
+ */
167
+ pageTemplateDirective;
168
+ /**
169
+ * @hidden
170
+ */
171
+ marginComponent;
52
172
  get drawMargin() {
53
173
  const marginComponent = this.marginComponent;
54
174
  let margin = this.margin;
@@ -57,6 +177,11 @@ export class PDFExportComponent {
57
177
  }
58
178
  return margin;
59
179
  }
180
+ pageTemplate;
181
+ constructor(element) {
182
+ this.element = element;
183
+ validatePackage(packageMetadata);
184
+ }
60
185
  /**
61
186
  * Saves the content as a PDF file with the specified name.
62
187
  * @param fileName - The name of the exported file.
@@ -139,10 +264,10 @@ export class PDFExportComponent {
139
264
  saveDataUri(dataUri, fileName, options) {
140
265
  saveAs(dataUri, fileName, options);
141
266
  }
267
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
268
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 });
142
269
  }
143
- PDFExportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
144
- PDFExportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportComponent, decorators: [{
270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportComponent, decorators: [{
146
271
  type: Component,
147
272
  args: [{
148
273
  selector: 'kendo-pdf-export',
@@ -13,11 +13,11 @@ import * as i3 from "./pdf-export-template.directive";
13
13
  * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the PDF Export directive.
14
14
  */
15
15
  export class PDFExportModule {
16
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
17
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: PDFExportModule, imports: [i1.PDFExportComponent, i2.PDFExportMarginComponent, i3.PDFExportTemplateDirective], exports: [i1.PDFExportComponent, i2.PDFExportMarginComponent, i3.PDFExportTemplateDirective] });
18
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportModule });
16
19
  }
17
- PDFExportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
18
- PDFExportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PDFExportModule, imports: [i1.PDFExportComponent, i2.PDFExportMarginComponent, i3.PDFExportTemplateDirective], exports: [i1.PDFExportComponent, i2.PDFExportMarginComponent, i3.PDFExportTemplateDirective] });
19
- PDFExportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportModule, imports: [i1.PDFExportComponent, i2.PDFExportMarginComponent] });
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportModule, decorators: [{
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportModule, decorators: [{
21
21
  type: NgModule,
22
22
  args: [{
23
23
  imports: [...KENDO_PDFEXPORT],
@@ -15,19 +15,20 @@ const packageMetadata = {
15
15
  name: '@progress/kendo-angular-pdf-export',
16
16
  productName: 'Kendo UI for Angular',
17
17
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
18
- publishDate: 1729174399,
19
- version: '17.0.0-develop.9',
18
+ publishDate: 1731413960,
19
+ version: '17.0.0',
20
20
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
21
21
  };
22
22
 
23
23
  class PDFExportTemplateDirective {
24
+ templateRef;
24
25
  constructor(templateRef) {
25
26
  this.templateRef = templateRef;
26
27
  }
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
29
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PDFExportTemplateDirective, isStandalone: true, selector: "[kendoPDFTemplate]", ngImport: i0 });
27
30
  }
28
- PDFExportTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
29
- PDFExportTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PDFExportTemplateDirective, isStandalone: true, selector: "[kendoPDFTemplate]", ngImport: i0 });
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportTemplateDirective, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportTemplateDirective, decorators: [{
31
32
  type: Directive,
32
33
  args: [{
33
34
  selector: '[kendoPDFTemplate]',
@@ -42,6 +43,26 @@ const FIELDS = ['bottom', 'left', 'right', 'top'];
42
43
  * Represents the Kendo UI PDFMargin component for Angular.
43
44
  */
44
45
  class PDFExportMarginComponent {
46
+ /**
47
+ * The bottom margin. The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"` (default).
48
+ * Numbers are considered to be points (`"pt"`).
49
+ */
50
+ left;
51
+ /**
52
+ * The top margin. The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"` (default).
53
+ * Numbers are considered to be points (`"pt"`).
54
+ */
55
+ top;
56
+ /**
57
+ * The right margin. The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"` (default).
58
+ * Numbers are considered to be points (`"pt"`).
59
+ */
60
+ right;
61
+ /**
62
+ * The bottom margin. The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"` (default).
63
+ * Numbers are considered to be points (`"pt"`).
64
+ */
65
+ bottom;
45
66
  /**
46
67
  * @hidden
47
68
  */
@@ -56,10 +77,10 @@ class PDFExportMarginComponent {
56
77
  }
57
78
  return options;
58
79
  }
80
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
81
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PDFExportMarginComponent, isStandalone: true, selector: "kendo-pdf-export-margin", inputs: { left: "left", top: "top", right: "right", bottom: "bottom" }, ngImport: i0, template: ``, isInline: true });
59
82
  }
60
- PDFExportMarginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
61
- PDFExportMarginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PDFExportMarginComponent, isStandalone: true, selector: "kendo-pdf-export-margin", inputs: { left: "left", top: "top", right: "right", bottom: "bottom" }, ngImport: i0, template: ``, isInline: true });
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportMarginComponent, decorators: [{
83
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportMarginComponent, decorators: [{
63
84
  type: Component,
64
85
  args: [{
65
86
  selector: 'kendo-pdf-export-margin',
@@ -122,20 +143,140 @@ const compileTemplate = (templateRef) => {
122
143
  * ```
123
144
  */
124
145
  class PDFExportComponent {
125
- constructor(element) {
126
- this.element = element;
127
- /**
128
- * The creator of the PDF document.
129
- * @default "Kendo UI PDF Generator"
130
- */
131
- this.creator = 'Kendo UI PDF Generator';
132
- /**
133
- * Specifies the name of the exported PDF file.
134
- * @default "export.pdf"
135
- */
136
- this.fileName = 'export.pdf';
137
- validatePackage(packageMetadata);
138
- }
146
+ element;
147
+ /**
148
+ * Specifies if the Print dialog should be opened immediately after loading the document ([see example](slug:autoprint_pdfexport)).
149
+ * Requires `@progress/kendo-drawing` v1.9.0 or later.
150
+ * @default false
151
+ */
152
+ autoPrint;
153
+ /**
154
+ * The author (metadata) of the PDF document.
155
+ */
156
+ author;
157
+ /**
158
+ * A flag that indicates whether to produce actual hyperlinks in the exported PDF file ([see example](slug:hyperlinks_pdfexport)).
159
+ * It is also possible to set a CSS selector. All matching links will be ignored.
160
+ */
161
+ avoidLinks;
162
+ /**
163
+ * An optional CSS selector that specifies the elements which cause the page breaks
164
+ * ([see example]({% slug multipagecontent_pdfexport %}#toc-manual-page-breaking)).
165
+ */
166
+ forcePageBreak;
167
+ /**
168
+ * An optional CSS selector that specifies the elements which should not be split across the pages
169
+ * ([see example]({% slug multipagecontent_pdfexport %}#toc-preventing-page-breaking-in-elements)).
170
+ */
171
+ keepTogether;
172
+ /**
173
+ * The creator of the PDF document.
174
+ * @default "Kendo UI PDF Generator"
175
+ */
176
+ creator = 'Kendo UI PDF Generator';
177
+ /**
178
+ * The date when the PDF document is created. Defaults to `new Date()`.
179
+ */
180
+ date;
181
+ /**
182
+ * The forced resolution of the images in the exported PDF document
183
+ * ([see example]({% slug embeddedimages_pdfexport %})).
184
+ * By default, the images are exported at their full resolution.
185
+ */
186
+ imageResolution;
187
+ /**
188
+ * Specifies the name of the exported PDF file.
189
+ * @default "export.pdf"
190
+ */
191
+ fileName = 'export.pdf';
192
+ /**
193
+ * If set to `true`, the content is forwarded to `proxyURL` even if the
194
+ * browser supports local saving of files.
195
+ */
196
+ forceProxy;
197
+ /**
198
+ * The keywords (metadata) of the PDF document.
199
+ */
200
+ keywords;
201
+ /**
202
+ * A flag that indicates if the page will be in a landscape orientation.
203
+ * By default, the page is in a portrait orientation.
204
+ *
205
+ * @default false
206
+ */
207
+ landscape;
208
+ /**
209
+ * Specifies the margins of the page. Numbers are treated as points (`"pt"`).
210
+ *
211
+ */
212
+ margin;
213
+ /**
214
+ * Specifies the paper size of the PDF document ([see example]({% slug multipagecontent_pdfexport %}#toc-automatic-page-breaking)).
215
+ * Defaults to `"auto"` which means that the paper size is determined by the content.
216
+ * The size of the content in pixels matches the size of the output in points (1 pixel = 1/72 inch).
217
+ * If `paperSize` is set, the content is split across multiple pages. This enables the `repeatHeaders` and
218
+ * `scale` options, and allows you to specify a template.
219
+ *
220
+ * The paper size can be a `PaperSize`, an array of two numbers which specify the width and height in points (1 pt = 1/72 in), or an
221
+ * array of two strings which specify the width and height in units. The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`.
222
+ * @default 'auto'
223
+ */
224
+ paperSize;
225
+ /**
226
+ * Specifies if the `<thead>` elements of the tables will be repeated on each page
227
+ * ([see example]({% slug recurrenttableheaders_pdfexport %})).
228
+ */
229
+ repeatHeaders;
230
+ /**
231
+ * A scale factor ([see example]({% slug scalingofcontent_pdfexport %})).
232
+ * The text size on the screen might be too big for printing.
233
+ * To scale down the output in PDF, use this option.
234
+ *
235
+ * @default 1
236
+ */
237
+ scale;
238
+ /**
239
+ * A key/value dictionary of form values which will be sent to the proxy.
240
+ * Can be used to submit Anti-Forgery tokens and other metadata.
241
+ */
242
+ proxyData;
243
+ /**
244
+ * The URL of the server-side proxy which streams the file to the end user. You need to use a proxy if
245
+ * the browser is not capable of saving files locally.
246
+ * It is your responsibility to implement the server-side proxy. The proxy returns the decoded file with
247
+ * the `"Content-Disposition"` header set to `attachment; filename="<fileName.pdf>"`.
248
+ *
249
+ * In the request body, the proxy receives a POST request with the specific parameters.
250
+ * [See example](slug:server_proxy#toc-implementations).
251
+ */
252
+ proxyURL;
253
+ /**
254
+ * A name or keyword which indicates where to display the document that is returned from the proxy.
255
+ * To display the document in a new window or iframe,
256
+ * the proxy has to have the `"Content-Disposition"` header set to `inline; filename="<fileName.pdf>"`.
257
+ * @default "_self"
258
+ */
259
+ proxyTarget;
260
+ /**
261
+ * The producer (metadata) of the PDF document.
262
+ */
263
+ producer;
264
+ /**
265
+ * The subject (metadata) of the PDF document.
266
+ */
267
+ subject;
268
+ /**
269
+ * The title (metadata) of the PDF document.
270
+ */
271
+ title;
272
+ /**
273
+ * @hidden
274
+ */
275
+ pageTemplateDirective;
276
+ /**
277
+ * @hidden
278
+ */
279
+ marginComponent;
139
280
  get drawMargin() {
140
281
  const marginComponent = this.marginComponent;
141
282
  let margin = this.margin;
@@ -144,6 +285,11 @@ class PDFExportComponent {
144
285
  }
145
286
  return margin;
146
287
  }
288
+ pageTemplate;
289
+ constructor(element) {
290
+ this.element = element;
291
+ validatePackage(packageMetadata);
292
+ }
147
293
  /**
148
294
  * Saves the content as a PDF file with the specified name.
149
295
  * @param fileName - The name of the exported file.
@@ -226,10 +372,10 @@ class PDFExportComponent {
226
372
  saveDataUri(dataUri, fileName, options) {
227
373
  saveAs(dataUri, fileName, options);
228
374
  }
375
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
376
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 });
229
377
  }
230
- PDFExportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
231
- PDFExportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
232
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportComponent, decorators: [{
378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportComponent, decorators: [{
233
379
  type: Component,
234
380
  args: [{
235
381
  selector: 'kendo-pdf-export',
@@ -302,11 +448,11 @@ const KENDO_PDFEXPORT = [
302
448
  * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the PDF Export directive.
303
449
  */
304
450
  class PDFExportModule {
451
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
452
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: PDFExportModule, imports: [PDFExportComponent, PDFExportMarginComponent, PDFExportTemplateDirective], exports: [PDFExportComponent, PDFExportMarginComponent, PDFExportTemplateDirective] });
453
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportModule });
305
454
  }
306
- PDFExportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
307
- PDFExportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PDFExportModule, imports: [PDFExportComponent, PDFExportMarginComponent, PDFExportTemplateDirective], exports: [PDFExportComponent, PDFExportMarginComponent, PDFExportTemplateDirective] });
308
- PDFExportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportModule, imports: [PDFExportComponent, PDFExportMarginComponent] });
309
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportModule, decorators: [{
455
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFExportModule, decorators: [{
310
456
  type: NgModule,
311
457
  args: [{
312
458
  imports: [...KENDO_PDFEXPORT],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-pdf-export",
3
- "version": "17.0.0-develop.9",
3
+ "version": "17.0.0",
4
4
  "description": "Kendo UI for Angular PDF Export Component",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -16,26 +16,22 @@
16
16
  "friendlyName": "PDFExport"
17
17
  },
18
18
  "peerDependencies": {
19
- "@angular/animations": "15 - 18",
20
- "@angular/common": "15 - 18",
21
- "@angular/core": "15 - 18",
22
- "@angular/platform-browser": "15 - 18",
23
- "@progress/kendo-drawing": "^1.20.4",
19
+ "@angular/animations": "16 - 18",
20
+ "@angular/common": "16 - 18",
21
+ "@angular/core": "16 - 18",
22
+ "@angular/platform-browser": "16 - 18",
23
+ "@progress/kendo-drawing": "^1.21.0",
24
24
  "@progress/kendo-licensing": "^1.0.2",
25
- "@progress/kendo-angular-common": "17.0.0-develop.9",
25
+ "@progress/kendo-angular-common": "17.0.0",
26
26
  "rxjs": "^6.5.3 || ^7.0.0"
27
27
  },
28
28
  "dependencies": {
29
29
  "tslib": "^2.3.1",
30
- "@progress/kendo-angular-schematics": "17.0.0-develop.9",
30
+ "@progress/kendo-angular-schematics": "17.0.0",
31
31
  "@progress/kendo-file-saver": "^1.0.1"
32
32
  },
33
33
  "schematics": "./schematics/collection.json",
34
- "module": "fesm2015/progress-kendo-angular-pdf-export.mjs",
35
- "es2020": "fesm2020/progress-kendo-angular-pdf-export.mjs",
36
- "esm2020": "esm2020/progress-kendo-angular-pdf-export.mjs",
37
- "fesm2020": "fesm2020/progress-kendo-angular-pdf-export.mjs",
38
- "fesm2015": "fesm2015/progress-kendo-angular-pdf-export.mjs",
34
+ "module": "fesm2022/progress-kendo-angular-pdf-export.mjs",
39
35
  "typings": "index.d.ts",
40
36
  "exports": {
41
37
  "./package.json": {
@@ -43,11 +39,9 @@
43
39
  },
44
40
  ".": {
45
41
  "types": "./index.d.ts",
46
- "esm2020": "./esm2020/progress-kendo-angular-pdf-export.mjs",
47
- "es2020": "./fesm2020/progress-kendo-angular-pdf-export.mjs",
48
- "es2015": "./fesm2015/progress-kendo-angular-pdf-export.mjs",
49
- "node": "./fesm2015/progress-kendo-angular-pdf-export.mjs",
50
- "default": "./fesm2020/progress-kendo-angular-pdf-export.mjs"
42
+ "esm2022": "./esm2022/progress-kendo-angular-pdf-export.mjs",
43
+ "esm": "./esm2022/progress-kendo-angular-pdf-export.mjs",
44
+ "default": "./fesm2022/progress-kendo-angular-pdf-export.mjs"
51
45
  }
52
46
  },
53
47
  "sideEffects": false
@@ -33,5 +33,5 @@ export declare class PDFExportMarginComponent implements pdf.PageMargin {
33
33
  */
34
34
  get options(): any;
35
35
  static ɵfac: i0.ɵɵFactoryDeclaration<PDFExportMarginComponent, never>;
36
- static ɵcmp: i0.ɵɵComponentDeclaration<PDFExportMarginComponent, "kendo-pdf-export-margin", never, { "left": "left"; "top": "top"; "right": "right"; "bottom": "bottom"; }, {}, never, never, true, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<PDFExportMarginComponent, "kendo-pdf-export-margin", never, { "left": { "alias": "left"; "required": false; }; "top": { "alias": "top"; "required": false; }; "right": { "alias": "right"; "required": false; }; "bottom": { "alias": "bottom"; "required": false; }; }, {}, never, never, true, never>;
37
37
  }
@@ -16,7 +16,7 @@ import * as i0 from "@angular/core";
16
16
  * The type will be linked to the kendo-drawing documentation
17
17
  * by using the slug provided in api-type-links.json
18
18
  */
19
- export declare type PaperSize = pdf.PaperSize;
19
+ export type PaperSize = pdf.PaperSize;
20
20
  /**
21
21
  * Represents the [Kendo UI PDF Export component for Angular]({% slug overview_pdfexport %}).
22
22
  *
@@ -201,5 +201,5 @@ export declare class PDFExportComponent implements pdf.PDFOptions {
201
201
  protected exportGroup(group: Group, options: pdf.PDFOptions): Promise<string>;
202
202
  private saveDataUri;
203
203
  static ɵfac: i0.ɵɵFactoryDeclaration<PDFExportComponent, never>;
204
- static ɵcmp: i0.ɵɵComponentDeclaration<PDFExportComponent, "kendo-pdf-export", never, { "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"; }, {}, ["pageTemplateDirective", "marginComponent"], ["*"], true, never>;
204
+ static ɵcmp: i0.ɵɵComponentDeclaration<PDFExportComponent, "kendo-pdf-export", never, { "autoPrint": { "alias": "autoPrint"; "required": false; }; "author": { "alias": "author"; "required": false; }; "avoidLinks": { "alias": "avoidLinks"; "required": false; }; "forcePageBreak": { "alias": "forcePageBreak"; "required": false; }; "keepTogether": { "alias": "keepTogether"; "required": false; }; "creator": { "alias": "creator"; "required": false; }; "date": { "alias": "date"; "required": false; }; "imageResolution": { "alias": "imageResolution"; "required": false; }; "fileName": { "alias": "fileName"; "required": false; }; "forceProxy": { "alias": "forceProxy"; "required": false; }; "keywords": { "alias": "keywords"; "required": false; }; "landscape": { "alias": "landscape"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; "paperSize": { "alias": "paperSize"; "required": false; }; "repeatHeaders": { "alias": "repeatHeaders"; "required": false; }; "scale": { "alias": "scale"; "required": false; }; "proxyData": { "alias": "proxyData"; "required": false; }; "proxyURL": { "alias": "proxyURL"; "required": false; }; "proxyTarget": { "alias": "proxyTarget"; "required": false; }; "producer": { "alias": "producer"; "required": false; }; "subject": { "alias": "subject"; "required": false; }; "title": { "alias": "title"; "required": false; }; }, {}, ["pageTemplateDirective", "marginComponent"], ["*"], true, never>;
205
205
  }
@@ -1,324 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as i0 from '@angular/core';
6
- import { Directive, Optional, Component, Input, ContentChild, NgModule } from '@angular/core';
7
- import { drawDOM, exportPDF } from '@progress/kendo-drawing';
8
- import { saveAs } from '@progress/kendo-file-saver';
9
- import { validatePackage } from '@progress/kendo-licensing';
10
-
11
- /**
12
- * @hidden
13
- */
14
- const packageMetadata = {
15
- name: '@progress/kendo-angular-pdf-export',
16
- productName: 'Kendo UI for Angular',
17
- productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
18
- publishDate: 1729174399,
19
- version: '17.0.0-develop.9',
20
- licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
21
- };
22
-
23
- class PDFExportTemplateDirective {
24
- constructor(templateRef) {
25
- this.templateRef = templateRef;
26
- }
27
- }
28
- PDFExportTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
29
- PDFExportTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PDFExportTemplateDirective, isStandalone: true, selector: "[kendoPDFTemplate]", ngImport: i0 });
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportTemplateDirective, decorators: [{
31
- type: Directive,
32
- args: [{
33
- selector: '[kendoPDFTemplate]',
34
- standalone: true
35
- }]
36
- }], ctorParameters: function () {
37
- return [{ type: i0.TemplateRef, decorators: [{
38
- type: Optional
39
- }] }];
40
- } });
41
-
42
- const FIELDS = ['bottom', 'left', 'right', 'top'];
43
- /**
44
- * Represents the Kendo UI PDFMargin component for Angular.
45
- */
46
- class PDFExportMarginComponent {
47
- /**
48
- * @hidden
49
- */
50
- get options() {
51
- const options = {};
52
- for (let idx = 0; idx < FIELDS.length; idx++) {
53
- const field = FIELDS[idx];
54
- const value = this[field];
55
- if (typeof value !== 'undefined') {
56
- options[field] = value;
57
- }
58
- }
59
- return options;
60
- }
61
- }
62
- PDFExportMarginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
63
- PDFExportMarginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PDFExportMarginComponent, isStandalone: true, selector: "kendo-pdf-export-margin", inputs: { left: "left", top: "top", right: "right", bottom: "bottom" }, ngImport: i0, template: ``, isInline: true });
64
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportMarginComponent, decorators: [{
65
- type: Component,
66
- args: [{
67
- selector: 'kendo-pdf-export-margin',
68
- template: ``,
69
- standalone: true
70
- }]
71
- }], propDecorators: { left: [{
72
- type: Input
73
- }], top: [{
74
- type: Input
75
- }], right: [{
76
- type: Input
77
- }], bottom: [{
78
- type: Input
79
- }] } });
80
-
81
- /**
82
- * @hidden
83
- */
84
- const compileTemplate = (templateRef) => {
85
- const context = {};
86
- let embeddedView = templateRef.createEmbeddedView(context);
87
- const result = (data) => {
88
- Object.assign(context, data);
89
- embeddedView.detectChanges();
90
- const templateWrap = document.createElement('span');
91
- embeddedView.rootNodes.forEach((rootNode) => {
92
- templateWrap.appendChild(rootNode.cloneNode(true));
93
- });
94
- return templateWrap;
95
- };
96
- result.destroy = () => {
97
- embeddedView.destroy();
98
- embeddedView = null;
99
- };
100
- return result;
101
- };
102
-
103
- /**
104
- * Represents the [Kendo UI PDF Export component for Angular]({% slug overview_pdfexport %}).
105
- *
106
- * @example
107
- * ```ts-preview
108
- * _@Component({
109
- * selector: 'my-app',
110
- * template: `
111
- * <div class="example-config">
112
- * <button kendoButton (click)="pdf.saveAs('document.pdf')">
113
- * Save As PDF...
114
- * </button>
115
- * </div>
116
- *
117
- * <kendo-pdf-export #pdf paperSize="A4" margin="2cm">
118
- * Content goes here
119
- * </kendo-pdf-export>
120
- * `
121
- * })
122
- * export class AppComponent {
123
- * }
124
- * ```
125
- */
126
- class PDFExportComponent {
127
- constructor(element) {
128
- this.element = element;
129
- /**
130
- * The creator of the PDF document.
131
- * @default "Kendo UI PDF Generator"
132
- */
133
- this.creator = 'Kendo UI PDF Generator';
134
- /**
135
- * Specifies the name of the exported PDF file.
136
- * @default "export.pdf"
137
- */
138
- this.fileName = 'export.pdf';
139
- validatePackage(packageMetadata);
140
- }
141
- get drawMargin() {
142
- const marginComponent = this.marginComponent;
143
- let margin = this.margin;
144
- if (marginComponent) {
145
- margin = Object.assign(margin || {}, marginComponent.options);
146
- }
147
- return margin;
148
- }
149
- /**
150
- * Saves the content as a PDF file with the specified name.
151
- * @param fileName - The name of the exported file.
152
- */
153
- saveAs(fileName = this.fileName) {
154
- this.save(this.element.nativeElement, fileName);
155
- }
156
- /**
157
- * Exports the content as a `Group` for further processing.
158
- *
159
- * @return The root group of the exported scene.
160
- */
161
- export() {
162
- return this.exportElement(this.element.nativeElement);
163
- }
164
- save(element, fileName) {
165
- this.exportElement(element)
166
- .then(group => this.exportGroup(group, this.pdfOptions()))
167
- .then(dataUri => this.saveDataUri(dataUri, fileName, this.saveOptions()));
168
- }
169
- exportElement(element) {
170
- const promise = this.drawElement(element, this.drawOptions());
171
- const cleanup = this.cleanup.bind(this);
172
- promise.then(cleanup, cleanup);
173
- return promise;
174
- }
175
- cleanup() {
176
- if (this.pageTemplate) {
177
- this.pageTemplate.destroy();
178
- delete this.pageTemplate;
179
- }
180
- }
181
- drawOptions() {
182
- if (this.pageTemplateDirective) {
183
- this.pageTemplate = compileTemplate(this.pageTemplateDirective.templateRef);
184
- }
185
- return {
186
- avoidLinks: this.avoidLinks,
187
- forcePageBreak: this.forcePageBreak,
188
- keepTogether: this.keepTogether,
189
- margin: this.drawMargin,
190
- paperSize: this.paperSize,
191
- landscape: this.landscape,
192
- repeatHeaders: this.repeatHeaders,
193
- scale: this.scale,
194
- template: this.pageTemplate
195
- };
196
- }
197
- pdfOptions() {
198
- return {
199
- autoPrint: this.autoPrint,
200
- author: this.author,
201
- creator: this.creator,
202
- date: this.date,
203
- imgDPI: this.imageResolution,
204
- keywords: this.keywords,
205
- landscape: this.landscape,
206
- margin: this.drawMargin,
207
- multiPage: true,
208
- paperSize: this.paperSize,
209
- producer: this.producer,
210
- subject: this.subject,
211
- title: this.title
212
- };
213
- }
214
- saveOptions() {
215
- return {
216
- forceProxy: this.forceProxy,
217
- proxyData: this.proxyData,
218
- proxyTarget: this.proxyTarget,
219
- proxyURL: this.proxyURL
220
- };
221
- }
222
- drawElement(element, options) {
223
- return drawDOM(element, options);
224
- }
225
- exportGroup(group, options) {
226
- return exportPDF(group, options);
227
- }
228
- saveDataUri(dataUri, fileName, options) {
229
- saveAs(dataUri, fileName, options);
230
- }
231
- }
232
- PDFExportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
233
- PDFExportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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 });
234
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportComponent, decorators: [{
235
- type: Component,
236
- args: [{
237
- selector: 'kendo-pdf-export',
238
- template: `<div><ng-content></ng-content></div>`,
239
- standalone: true
240
- }]
241
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { autoPrint: [{
242
- type: Input
243
- }], author: [{
244
- type: Input
245
- }], avoidLinks: [{
246
- type: Input
247
- }], forcePageBreak: [{
248
- type: Input
249
- }], keepTogether: [{
250
- type: Input
251
- }], creator: [{
252
- type: Input
253
- }], date: [{
254
- type: Input
255
- }], imageResolution: [{
256
- type: Input
257
- }], fileName: [{
258
- type: Input
259
- }], forceProxy: [{
260
- type: Input
261
- }], keywords: [{
262
- type: Input
263
- }], landscape: [{
264
- type: Input
265
- }], margin: [{
266
- type: Input
267
- }], paperSize: [{
268
- type: Input
269
- }], repeatHeaders: [{
270
- type: Input
271
- }], scale: [{
272
- type: Input
273
- }], proxyData: [{
274
- type: Input
275
- }], proxyURL: [{
276
- type: Input
277
- }], proxyTarget: [{
278
- type: Input
279
- }], producer: [{
280
- type: Input
281
- }], subject: [{
282
- type: Input
283
- }], title: [{
284
- type: Input
285
- }], pageTemplateDirective: [{
286
- type: ContentChild,
287
- args: [PDFExportTemplateDirective, { static: false }]
288
- }], marginComponent: [{
289
- type: ContentChild,
290
- args: [PDFExportMarginComponent, { static: false }]
291
- }] } });
292
-
293
- /**
294
- * Utility array that contains all `PDFExport` related components and directives
295
- */
296
- const KENDO_PDFEXPORT = [
297
- PDFExportComponent,
298
- PDFExportMarginComponent,
299
- PDFExportTemplateDirective
300
- ];
301
-
302
- // IMPORTANT: NgModule export kept for backwards compatibility
303
- /**
304
- * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the PDF Export directive.
305
- */
306
- class PDFExportModule {
307
- }
308
- PDFExportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
309
- PDFExportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PDFExportModule, imports: [PDFExportComponent, PDFExportMarginComponent, PDFExportTemplateDirective], exports: [PDFExportComponent, PDFExportMarginComponent, PDFExportTemplateDirective] });
310
- PDFExportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportModule, imports: [PDFExportComponent, PDFExportMarginComponent] });
311
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFExportModule, decorators: [{
312
- type: NgModule,
313
- args: [{
314
- imports: [...KENDO_PDFEXPORT],
315
- exports: [...KENDO_PDFEXPORT]
316
- }]
317
- }] });
318
-
319
- /**
320
- * Generated bundle index. Do not edit.
321
- */
322
-
323
- export { KENDO_PDFEXPORT, PDFExportComponent, PDFExportMarginComponent, PDFExportModule, PDFExportTemplateDirective, compileTemplate };
324
-
File without changes
File without changes
File without changes