FunctionsExtractorPdf to htmlUtil
Is Url Pdf
ai-research-agent / extractor/pdf-to-html/util/is-url-pdf
Extract
isUrlPDF()
function isUrlPDF(url: string): Promise<boolean>;Defined in: src/extractor/pdf-to-html/util/is-url-pdf.js:12
Detects if a given URL points to a PDF file by checking the stream's first bytes for %PDF- then ends the request. Useful for hidden pdf url that does not end with pdf
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The URL to check. |
Returns
Promise<boolean>
True if the URL points to a PDF, false otherwise.