UNPKG

@progress/kendo-vue-pdf

Version:
68 lines (67 loc) 1.98 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { defineComponent as r, createVNode as t } from "vue"; import { drawDOM as o, exportPDF as a } from "@progress/kendo-drawing"; import { saveAs as n } from "@progress/kendo-file-saver"; import i from "./KendoDrawingAdapter.mjs"; import { validatePackage as p, getDefaultSlots as g } from "@progress/kendo-vue-common"; import { packageMetadata as m } from "./package-metadata.mjs"; const u = /* @__PURE__ */ r({ name: "pdf-export", props: { author: String, avoidLinks: [Boolean, String], forcePageBreak: String, keepTogether: String, creator: String, date: Date, imageResolution: Number, fileName: String, forceProxy: Boolean, keywords: String, landscape: Boolean, margin: [String, Object], pageTemplate: [Object, Function], paperSize: [String, Object], repeatHeaders: Boolean, scale: Number, proxyData: Object, proxyURL: String, proxyTarget: String, producer: String, subject: String, title: String }, methods: { save(e) { new i( o, a, n, this.$el, // To do: we should consider whether we need a margin-top, margin-left, etc. props this.$props ).savePDF(e); } }, created: function() { p(m); }, // @ts-ignore render() { const e = g(this); return t("div", null, [e]); } // To do: we should consider whether we need a margin-top, margin-left, etc. props // private getOptions() { // return Object.assign({}, this.$props, { margin: getPageMrgin(this.$props) }); // } }); export { u as PDFExport };