Skip to main content
static getMarkPages(filePath: string): Promise<APIResponse<number[]>>;
Parameters
ParameterTypeDescription
filePathstringDOC file path
Returns

Example

import { PluginFileAPI } from 'sn-plugin-lib';

/**
 * Example: get mark page indices.
 */
export async function exampleGetMarkPages() {
 const filePath = '/storage/emulated/0/Note/demo.pdf';
 const res = await PluginFileAPI.getMarkPages(filePath);
 if (!res.success) {
 throw new Error(res.error?.message ?? 'getMarkPages call failed');
 }
 return res.result;
}