export_audit_pdf
Generate a PDF report of an on-page SEO audit for any URL. Re-run the audit, include score, issues, metadata, and optional PageSpeed metrics, then save the file and return its path.
Instructions
Generate a professionally laid-out PDF report of an on-page SEO audit (score badge, summary cards, severity-colored issue list, metadata, content/structure, social tags, and optional PageSpeed metrics). Re-runs the audit for the URL and writes a .pdf to disk, returning the file path. Use this after audit_page when the user asks for a PDF report.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Page URL to audit and export (https:// optional) | |
| path | No | Output file path (default: ./seo-audit-<host>-<date>.pdf in the current directory). ".pdf" is appended if missing. | |
| detail | No | Include the full GTmetrix-style detail in the PDF (category scores, diagnostics, resource weight, prioritized suggestions, passed checks). Defaults to true when pagespeed=true. | |
| strategy | No | Limit the PageSpeed section to one strategy: "mobile" or "desktop". Omit to include BOTH in the same file (default). | |
| pagespeed | No | Also run PageSpeed and include performance metrics in the report (default false). When true, BOTH Mobile and Desktop are included in the same PDF unless a single "strategy" is specified. |