static getPageSize(NOTEPath: string, page: number): Promise<APIResponse<Size>>;
| Parameter | Type | Description |
|---|---|---|
NOTEPath | string | NOTE/DOC file path |
page | number | Page index (starts from 0) |
APIResponse<Size>:resultis the page size. SeeSize.
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;
}