Skip to main content

page-number-functions

ai-research-agent / extractor/pdf-to-html/util/page-number-functions

Functions

findFirstPage()

function findFirstPage(pageIndexNumMap): object

Checks when the page number first begins and returns it

Parameters

ParameterTypeDescription

pageIndexNumMap

object

object

Returns

object

For example: pageIndex: 10, pageNum: 3


findPageNumbers()

function findPageNumbers(
pageIndexNumMap,
pageIndex,
items): object

Searches both top and bottom area and returns an object

Parameters

ParameterTypeDescription

pageIndexNumMap

object

object

pageIndex

number

index of the page

items

array

textContent.items

Returns

object

pageIndexNumMap object


removePageNumber()

function removePageNumber(textContent, pageNum): object

Return textContent with items that have pageNum removed

Parameters

ParameterTypeDescription

textContent

object

object

pageNum

number

Returns

object

filteredContent - textContent without items that have pageNum