mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-02 19:17:03 +00:00
12 lines
326 B
TypeScript
12 lines
326 B
TypeScript
import { invoke } from "@tauri-apps/api/core";
|
|
|
|
export interface ImageInput {
|
|
path: string;
|
|
data: string;
|
|
}
|
|
|
|
export async function compilePdf(source: string, images: ImageInput[] = []): Promise<Uint8Array> {
|
|
const buffer = await invoke<ArrayBuffer>("compile_pdf", { source, images });
|
|
return new Uint8Array(buffer);
|
|
}
|