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