-
Notifications
You must be signed in to change notification settings - Fork 5
PdfDataExtractor
the extractor for the data of the pdf
• get
fingerprint(): string
get the fingerprint
string
the fingerprint
• get
pages(): number
get the number of pages
number
the number of pages
▸ close(): Promise
<void
>
close the extractor
Promise
<void
>
a promise that is resolved when destruction is completed
▸ getMetadata(): Promise
<null
| MetadataInfo
>
get the metadata
Promise
<null
| MetadataInfo
>
a promise that is resolved with a {MetadataInfo | null} object with information from the metadata section
▸ getOutline(): Promise
<null
| Outline
[]>
get the outline/bookmarks
Promise
<null
| Outline
[]>
a promise that is resolved with a {Outline[]} array with information from the tree outline
▸ getPageData(pages?
): Promise
<(null
| PdfPageData
)[]>
get the text
Name | Type |
---|---|
pages? |
number | number [] | (pageNumber : number ) => boolean
|
Promise
<(null
| PdfPageData
)[]>
a promise that is resolved with a {string[]} array with the extracted text per page
▸ getPermissions(): Promise
<null
| Permissions
>
get the permission flags
Promise
<null
| Permissions
>
a promise that is resolved with a {Permissions | null} object that contains the permission flags for the PDF
▸ getText(pages?
, sort?
): Promise
<string
[]>
get the text
Name | Type | Default value |
---|---|---|
pages? |
number | number [] | (pageNumber : number ) => boolean
|
undefined |
sort |
boolean | Sort
|
false |
Promise
<string
[]>
a promise that is resolved with a {string[]} array with the extracted text per page
▸ Static
get(data
, options?
): Promise
<PdfDataExtractor
>
get the extractor for the data
Name | Type | Description |
---|---|---|
data |
Uint8Array |
the binary data file |
options |
PdfDataExtractorOptions |
- |
Promise
<PdfDataExtractor
>
a promise that is resolved with a {PdfDataExtractor} object to pull the extracted data from