UNPKG

@progress/kendo-angular-pdf-export

Version:

Kendo UI for Angular PDF Export Component

81 lines (80 loc) 3.16 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Component, Input } from '@angular/core'; import * as i0 from "@angular/core"; const FIELDS = ['bottom', 'left', 'right', 'top']; /** * Represents the Kendo UI PDFMargin component for Angular. * * @example * ```html * <kendo-pdf-export paperSize="A4"> * <kendo-pdf-export-margin top="2cm" left="1cm" right="1cm" bottom="2cm"> * </kendo-pdf-export-margin> * </kendo-pdf-export> * ``` */ export class PDFExportMarginComponent { /** * Sets the left margin of the PDF page. Accepts a `number` or `string` value. * * The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`. Numbers use points (`"pt"`). * @default "pt" */ left; /** * Sets the top margin of the PDF page. Accepts a `number` or `string` value. * * The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`. Numbers use points (`"pt"`). * @default "pt" */ top; /** * Sets the right margin of the PDF page. Accepts a `number` or `string` value. * * The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`. Numbers use points (`"pt"`). * @default "pt" */ right; /** * Sets the bottom margin of the PDF page. Accepts a `number` or `string` value. * * The supported units are `"mm"`, `"cm"`, `"in"`, and `"pt"`. Numbers use points (`"pt"`). * @default "pt" */ bottom; /** * @hidden */ get options() { const options = {}; for (let idx = 0; idx < FIELDS.length; idx++) { const field = FIELDS[idx]; const value = this[field]; if (typeof value !== 'undefined') { options[field] = value; } } return options; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFExportMarginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); 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 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PDFExportMarginComponent, decorators: [{ type: Component, args: [{ selector: 'kendo-pdf-export-margin', template: ``, standalone: true }] }], propDecorators: { left: [{ type: Input }], top: [{ type: Input }], right: [{ type: Input }], bottom: [{ type: Input }] } });