A Singapore Government Agency Website

Scan PDFs and local files

What this guide covers

Oobee scans an HTML file or a PDF file on your computer with the local file scan type. It can also scan the PDF files that a website or sitemap links to. Oobee checks PDFs with VeraPDF and checks HTML files with the same engine it uses for web pages. This guide covers file paths, the file types option and the limits of PDF scans.

Prerequisites

Step 1: Scan a local file

Use scan type localfile and give the file path with -u. Oobee accepts an absolute or relative path, or a file:// URL.

npm run cli -- -c localfile -u <FILE_PATH> -i all -k "<YOUR_NAME>:<YOUR_EMAIL>"

Add -i all or -i pdf-only when the file is a PDF. The default file type, html-only, rejects a PDF with the message “Uploaded file format is incorrect. Please upload a HTML, PDF, XML or TXT file.”

Oobee scans one HTML or PDF file per local file scan. If the path points to a file that ends in .xml or .txt, Oobee reads it as a sitemap and scans the pages it lists.

Step 2: Include PDFs in a website or sitemap scan

By default, Oobee scans HTML pages only. To scan the PDF files that Oobee finds while crawling, set the file types option -i:

Value Effect
html-only Scan HTML pages only. This is the default.
all Scan HTML pages and PDF files.
pdf-only Scan PDF files only.
npm run cli -- -c intelligent -u <WEBSITE_URL> -i all -k "<YOUR_NAME>:<YOUR_EMAIL>"

The interactive npm start mode scans both HTML and PDF files.

Step 3: Read the PDF results

PDF issues appear in the same reports as web page issues, under the PDF file’s name. Oobee omits Level AAA PDF rules and a small set of excluded VeraPDF rules. Refer to Scan report files for the report layout.

Constraints and limitations

Constraint Detail
VeraPDF PDF scans need the verapdf executable. If Oobee cannot find it, it logs “Could not find veraPDF executable”.
Valid PDFs Oobee scans a file as a PDF only if it starts with %PDF- and contains %%EOF near its end.
Download size Oobee downloads at most four PDFs at a time. A single PDF over 100 MB is not downloaded unless you raise OOBEE_PDF_MAX_DOWNLOAD_BYTES.
File types A local file scan accepts HTML, PDF, .xml and .txt files. Other types are rejected.
Strategy -s is not available for local file scans.
Chat with me!
Bot Launcher