browser-pdf-handling

Recover PDF source URLs from Chrome's viewer and save pages as PDF files.

38|6|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/7757/Fan-Browser-Agent --skill browser-pdf-handling-7757
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: browser-pdf-handling
Source: https://github.com/7757/Fan-Browser-Agent/tree/main/skills/browser/browser-pdf-handling
Command: npx skills add https://github.com/7757/Fan-Browser-Agent --skill browser-pdf-handling-7757

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a browser agent navigates to a PDF, Chrome's built-in PDF viewer renders it as a special internal page where DOM observation returns almost nothing, making the page look blank and blocking normal automation. This Skill teaches how to recognize the viewer, recover the real PDF source URL, download linked PDFs, and capture any page as a PDF file. ## Core Features & Use Cases - Viewer Detection and URL Recovery: Recognize the Chrome PDF viewer by its .pdf URL, filename title, and empty observation, then recover the direct source URL with browser_evaluate, decoding any file= wrapper parameter. - Page-to-PDF Capture: Use browser_save_pdf to render the current HTML page or open PDF viewer to a file with control over paper format, orientation, scale, and background printing. - Download Handling: Click download links and confirm saved files in the downloads directory via result paths or browser_events. - Use Case: While researching on PubMed, the agent opens a paper that loads in the Chrome PDF viewer and observation returns nothing. The Skill guides it to recover the direct .pdf URL, save the file with browser_save_pdf, and hand it to a file tool for text extraction. ## Quick Start When the current page is a PDF in the Chrome viewer, recover the real source URL with browser_evaluate and save it using browser_save_pdf with A4 format.

Frequently Asked Questions about browser-pdf-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save the current browser page as a PDF?▼

Call browser_save_pdf with a file name and options like paper_format (Letter, Legal, A4, A3, Tabloid), landscape, scale, and print_background. It renders the full page via CDP Page.printToPDF and returns the saved file path in the downloads directory.

Why does browser_observe return nothing on a PDF page?▼

Chrome renders PDFs in a built-in viewer that is a special internal page, not normal HTML, so the indexed DOM is mostly empty. Recognize it by the .pdf URL and filename title, then recover the source URL with browser_evaluate instead of clicking around.

How do I extract text from a PDF opened in the browser?▼

PDF text is not exposed in the viewer's DOM, so browser_page_content and browser_observe cannot read it. Recover the direct .pdf URL or save the file with browser_save_pdf, then extract text using a fetch, file, or terminal tool.

How do I find the real PDF URL inside a viewer wrapper?▼

Run browser_evaluate with () => location.href to get the current URL. If the viewer wraps the source as a query like pdf-viewer?file=<encoded-url>, decode the file= parameter to obtain the direct document URL.

Do I need to scroll a long PDF before saving it?▼

No. browser_save_pdf renders the entire document regardless of scroll position and paginates automatically, so scrolling first is unnecessary.

When should I not use browser_save_pdf?▼

Do not use it to read normal HTML article text; browser_page_content is the right tool for that. Also note browser_save_pdf writes a file and returns a path, not inline PDF bytes.