Documentation Index
Fetch the complete documentation index at: https://docs.supernote.com/llms.txt
Use this file to discover all available pages before exploring further.
static getPageSize(NOTEPath: string, page: number): Promise<APIResponse<Size>>;
Parameters
| Parameter | Type | Description |
|---|
NOTEPath | string | NOTE/DOC file path |
page | number | Page index (starts from 0) |
Returns
Example
import { PluginFileAPI } from 'sn-plugin-lib';
/**
* Example: get page size in pixels.
*/
export async function exampleGetPageSize() {
const NOTEPath = '/storage/emulated/0/Note/demo.note';
const page = 1;
const res = await PluginFileAPI.getPageSize(NOTEPath, page);
if (!res.success) {
throw new Error(res.error?.message ?? 'getPageSize call failed');
}
return res.result;
}