Use when auditing a site that publishes downloadable PDFs (reports, white papers, legal documents, manuals). Applies to any site where PDFs are linked as indexa
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-pdf-size-9de54a9d5468 ,按照其中的说明把「pdf-size」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
PDFs larger than Googlebot's download threshold are partially crawled or skipped, meaning their content may not appear in search results even when linked from well-indexed pages.
Compress large PDFs using a PDF optimisation tool (Adobe Acrobat, Ghostscript, or Smallpdf). Remove embedded high-resolution images, fonts, and metadata not required for reading. If compression is insufficient, create an HTML page with the same content as the primary indexable version, and offer the PDF as a download.
Googlebot downloads and indexes the content of PDFs linked from your site. However, it has a file size limit for downloads — files beyond this limit are partially indexed or skipped. Large PDFs also slow down crawling and consume crawl budget. Keeping PDFs small ensures their full content appears in search results.
Find all links with .pdf extension. For each PDF URL, perform a HEAD request and check Content-Length header value. Flag PDFs exceeding 10,485,760 bytes (10 MB) for compression review. Flag PDFs exceeding 15,728,640 bytes (15 MB) as at-risk for partial indexing. Verify PDF URLs return 200 status and appropriate Content-Type: application/pdf header.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/en/rules/seo/pdf-size