import { PluginFileAPI } from 'sn-plugin-lib';
/**
* Example: generate a mark thumbnail.
*/
export async function exampleGenerateMarkThumbnails() {
const markPath = '/storage/emulated/0/Note/demo.pdf';
const page = 1;
const pngPath = '/storage/emulated/0/Note/out/mark.png';
const size = { width: 512, height: 512 };
const res = await PluginFileAPI.generateMarkThumbnails(markPath, page, pngPath, size);
if (!res.success) {
throw new Error(res.error?.message ?? 'generateMarkThumbnails call failed');
}
return res.result;
}