Examples
Constructors
new PdfFile()
Parameters
• data:Buffer
The binary data of the PDF file.
Returns
PdfFile
Methods
getContent()
Parameters
• pageNumbers?:number
[]
Optional. An array of page numbers to get content from.
Returns
Promise
<PdfFileContentItem
[]>
A promise that resolves to the content of the specified pages.
Examples
pagesCount()
Returns
Promise
<number
>
A promise that resolves to the number of pages.
Examples
search()
Parameters
• search:string
The string to search for.
• options?: SearchPdfConfigs
Optional. Search configuration options.
Returns
Promise
<SearchPdfResult
[]>
A promise that resolves to an array of search results.
Examples
fromUrl()
Parameters
• url:string
The URL of the PDF file.
Returns
Promise
<PdfFile
>
A promise that resolves to a PdfFile instance.