@ceereals/vue-pdf
Version:
Vue PDF - Create PDF documents using Vue components
66 lines (65 loc) • 1.63 kB
JavaScript
import { isVNode as c, h as l } from "vue";
import { r as d, p } from "../index-BUmnDTSs.js";
import { C as L, g as R, j as V, c as b, D as k, E as v, G as F, I as x, b as y, k as C, L as E, N as G, P as N, a as B, h as I, i as O, l as j, R as A, S as W, e as q, f as z, T as H, d as J, V as K, n as M, m as Q, u as U } from "../index-BUmnDTSs.js";
import f from "node:fs";
const P = () => {
throw new Error("PDFViewer is not available in the browser");
}, h = () => {
throw new Error("PDFDownloadLink is not available in the browser");
}, i = (a, n) => {
const e = {
type: "ROOT",
document: null
};
let r = a;
return c(a) || (r = l(a)), d(r, e), p(e, n);
}, D = (a, n) => i(a, n).then((e) => {
const r = [];
return new Promise((o, s) => {
e.on("data", (t) => {
r.push(t);
}), e.on("end", () => {
o(Buffer.concat(r));
}), e.on("error", s);
});
}), T = async (a, n, e) => {
const r = await i(a, e), o = f.createWriteStream(n);
return r.pipe(o), new Promise((s, t) => {
o.on("finish", () => s(r)), o.on("error", t);
});
};
export {
L as Canvas,
R as Circle,
V as ClipPath,
b as Defs,
k as Document,
v as Ellipse,
F as G,
x as Image,
y as Line,
C as LinearGradient,
E as Link,
G as Note,
h as PDFDownloadLink,
P as PDFViewer,
N as Page,
B as Path,
I as Polygon,
O as Polyline,
j as RadialGradient,
A as Rect,
W as Stop,
q as Svg,
z as SvgText,
H as Text,
J as Tspan,
K as View,
M as createApp,
Q as ensureRenderer,
d as render,
D as renderToBuffer,
T as renderToFile,
i as renderToStream,
U as usePdf
};