Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Generate a thumbnail image for a layer.
PluginNoteAPI
static generateLayerPreviewImage( notePath: string, page: number, layer: number, imagePath: string ): Promise<APIResponse<boolean>>;
notePath
string
page
number
0
layer
-1
1~3
imagePath
APIResponse<boolean>
result === true
import { PluginNoteAPI } from 'sn-plugin-lib'; /** * Example: generate a thumbnail image for a layer. */ export async function exampleGenerateLayerPreviewImage() { const res = await PluginNoteAPI.generateLayerPreviewImage( '/storage/emulated/0/Note/demo.note', 0, 0, '/storage/emulated/0/Note/out/layer-preview.png' ); if (!res.success) { throw new Error(res.error?.message ?? 'generateLayerPreviewImage call failed'); } return res.result; }