Function pdfGetPages

  • Parse text content of each page in a PDF file.

    Parameters

    • filepath: string

      The path to the PDF file.

    • Optional begin: number

      The starting page number for the range of pages to retrieve. Optional.

    • Optional end: number

      The ending page number for the range of pages to retrieve. Optional.

    Returns Promise<string[]>

    A Promise that resolves to an array of strings, where each string represents a page in the PDF.

    Example

    const pages = await pdfGetPages('/path/to/pdf', 1, 5);
    console.log(pages); // logs the first 5 pages of the PDF

Generated using TypeDoc