What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Use two cooperating pieces: a Manifest V3 browser extension for the user-facing “save this page” action, and a Puppeteer process when you need controlled, repeatable PDF generation. The extension should request page access only after an explicit click, while Puppeteer navigates to a URL and returns PDF bytes with page.pdf(). They solve related problems, but Puppeteer is not an extension runtime API.
Decide which PDF workflow you are building
Start by defining where conversion runs. A toolbar button that captures the tab a person is reading has a different security and operational model from a server job that converts thousands of URLs.
| Question | Browser extension | Puppeteer automation |
|---|---|---|
| Execution context | The user’s installed browser and current tab | A controlled Chromium process on a workstation, server or CI runner |
| Typical trigger | Toolbar button, context-menu item or command | Application request, queue worker, scheduled job or test |
| Page access | activeTab for temporary, click-initiated access, or persistent host permissions |
The automation process navigates to URLs it is allowed to reach |
| Output control | Usually hands the page to the browser’s print/save flow | Programmatic PDF options and a returned byte array |
| Operational scope | One active page at a time | Repeatable captures, batches and server-side pipelines |
Chrome’s Manifest V3 APIs are generally supported from Chrome 88, but individual APIs can have different availability requirements. Check the API reference for the browser version you intend to support before choosing a minimum version: Chrome API reference.
Build the extension shell
A minimal extension has a manifest, a service worker and, if you need to inspect or alter page content, a content script. The example below uses a toolbar click and activeTab, which grants temporary access after the user invokes the extension. This is narrower than requesting access to every website.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →#1 Best Overall
- Convert your PDF files into Word, Excel & Co. the easy way
- Convert scanned documents thanks to our new 2022 OCR technology
- Adjustable conversion settings
- No subscription! Lifetime license!
- Compatible with Windows 11, 10, 8.1, 7 - Internet connection required
1. Create manifest.json
{
"manifest_version": 3,
"name": "Page PDF Helper",
"version": "1.0.0",
"description": "Prepare the current page for PDF printing.",
"permissions": ["activeTab", "scripting"],
"background": {
"service_worker": "service-worker.js",
"type": "module"
},
"action": {
"default_title": "Save page as PDF"
},
"commands": {
"save-page": {
"suggested_key": { "default": "Ctrl+Shift+Y" },
"description": "Prepare the current page for PDF printing"
}
}
}
The scripting permission enables runtime JavaScript or CSS injection. Chrome requires either host permissions for the target URL or the temporary activeTab grant following a user action. MDN documents the same permission model in its scripting API reference; Chrome’s API details are at browser.scripting.
2. Add a service worker
const openPrintPreview = async (tab) => {
if (!tab.id) return;
await chrome.scripting.executeScript({
target: { tabId: tab.id },
func: () => {
document.documentElement.classList.add('pdf-extension-active');
window.print();
}
});
};
chrome.action.onClicked.addListener(openPrintPreview);
chrome.commands.onCommand.addListener(async (command) => {
if (command !== 'save-page') return;
const [tab] = await chrome.tabs.query({ active: true, lastFocusedWindow: true });
await openPrintPreview(tab);
});
This code deliberately opens the browser’s print interaction rather than claiming that an extension API directly exports an arbitrary tab to a PDF file. The available documentation establishes scripting and page access, but not a universal “export active tab as PDF” API. Your product can guide the user to choose “Save to PDF” in the native dialog, or you can pair the extension with a backend that receives a URL and generates the file with Puppeteer.
3. Add print CSS
/* Inject this stylesheet from a content script or your page bundle. */
@media print {
nav, aside, .cookie-banner, .newsletter-modal, .chat-widget,
[data-pdf-hide] {
display: none !important;
}
a { color: #000; text-decoration: none; }
h1, h2, h3 { break-after: avoid; }
table, img, pre { break-inside: avoid; }
.pdf-section { break-before: page; }
}
html.pdf-extension-active {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
Print output is controlled by the document’s print rules and the browser’s print implementation. Hide navigation and transient UI, set page-break behavior, and test long tables and code blocks. Use -webkit-print-color-adjust: exact when preserving colors matters; browsers may otherwise alter colors for paper output.
Rank #2
- Convert over 50 document file formats.
- Preview your files from Doxillion before converting them.
- Use batch conversion to convert thousands of files at once.
- Enjoy an easy-to-use, intuitive interface with a Drag and Drop file option.
- Burn your converted or original files directly to disc.
Use Puppeteer for deterministic PDF bytes
Puppeteer is the better route for a service, command-line tool, batch converter or automated regression test. Its Page.pdf() method generates a PDF using the print CSS media type by default and returns a Uint8Array. The API reference is Page.pdf(); the project’s guide is PDF generation.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteInstall and run a complete Node.js converter
npm init -y
npm install puppeteer
// convert.js
import puppeteer from 'puppeteer';
import { writeFile } from 'node:fs/promises';
const target = process.argv[2];
if (!target) {
console.error('Usage: node convert.js https://example.com [output.pdf]');
process.exit(1);
}
const output = process.argv[3] ?? 'page.pdf';
const browser = await puppeteer.launch({ headless: true });
try {
const page = await browser.newPage();
await page.setViewport({ width: 1440, height: 900, deviceScaleFactor: 1 });
await page.goto(target, { waitUntil: 'networkidle2', timeout: 90000 });
// Use screen styles instead of print styles when that is the desired result.
// await page.emulateMediaType('screen');
await page.evaluate(() => document.fonts.ready);
await page.pdf({
path: output,
format: 'A4',
printBackground: true,
margin: { top: '16mm', right: '14mm', bottom: '16mm', left: '14mm' },
preferCSSPageSize: true,
displayHeaderFooter: false
});
console.log(`Wrote ${output}`);
} finally {
await browser.close();
}
Run it with node convert.js https://example.com example.pdf. networkidle2 is a useful baseline, not a guarantee that application data is finished. For a page with a known readiness marker, wait for that selector instead:
await page.goto(target, { waitUntil: 'domcontentloaded', timeout: 90000 });
await page.waitForSelector('[data-report-ready]', { timeout: 30000 });
Choose media, paper and color behavior
- Print versus screen:
page.pdf()uses print media. Callpage.emulateMediaType('screen')before PDF generation if the screen design is the intended output. - Paper and orientation: use
format: 'A4','Letter'or explicitwidth/height; addlandscape: truefor wide reports. - Margins: set all four margins explicitly when page geometry matters.
- Backgrounds:
printBackground: truerequests background graphics, while print CSS can still affect the result. - CSS page size:
preferCSSPageSize: truelets an author’s@pagesize win over the format setting. - Fonts: Puppeteer’s PDF workflow waits for fonts by default; waiting for
document.fonts.readyas well makes the readiness point visible in your code.
Load an extension while testing
Puppeteer documents loading Chrome extensions and evaluating their content-script execution realms in its Chrome Extensions guide. Use that capability to verify that the manifest loads, a toolbar action reaches the expected script and representative pages produce an artifact. Keep this test separate from production conversion: the extension runs inside the browser, while page.pdf() is the automation process’s output API.
Rank #3
- EDIT text, images & designs in PDF documents. ORGANIZE PDFs. Convert PDFs to Word, Excel & ePub.
- READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.
- CREATE, COMBINE, SCAN and COMPRESS PDFs
- FILL forms & Digitally Sign PDFs. PROTECT and Encrypt PDFs
- LIFETIME License for 1 Windows PC or Laptop. 5GB MobiDrive Cloud Storage Included.
const browser = await puppeteer.launch({
headless: false,
args: [
'--disable-extensions-except=/absolute/path/to/extension',
'--load-extension=/absolute/path/to/extension'
]
});
Make the capture reliable
Wait for the real content
Single-page applications often render an empty shell first. Prefer a page-specific readiness selector, then wait for fonts and any images that are essential to the document. A short, bounded delay can handle an animation, but it should not replace a deterministic condition.
await page.waitForFunction(() => {
return document.readyState === 'complete' && document.querySelectorAll('img').length > 0;
}, { timeout: 30000 });
await page.evaluate(() => document.fonts.ready);
Control page breaks
Use @page, break-before, break-after and break-inside. Test a short page, a very long article, a table spanning several pages and content containing large images. A rule that prevents a table row from splitting may create a large blank area; decide whether that trade-off is acceptable for your document.
Handle authentication and private content
For protected pages, authenticate in Puppeteer before navigating to the report, or supply cookies and headers through your own application. Do not put user credentials in extension source or expose them to untrusted pages. If conversion is user initiated, explain which page data leaves the browser and where the generated PDF is stored.
Rank #4
- Edit PDFs with Ease. Modify text, images, and layouts directly within your PDF documents.
- Convert & Organize. Export PDFs to Word, Excel, or ePub, and organize files with ease.
- Read & Annotate. Enjoy intuitive reading modes and powerful tools to comment, highlight, and mark up PDFs.
- Create & Manage PDFs. Create new PDFs, combine multiple files, scan documents, and compress for easy sharing.
- Fill & Sign Forms. Complete forms and digitally sign documents with secure e-signature tools.
Common failures and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
chrome.scripting fails with a permission error |
The manifest lacks scripting, or the tab has no host access |
Add scripting and use activeTab after a user gesture, or declare only the required host permissions. |
| The extension works on ordinary sites but not a browser-internal page | Chrome restricts extension injection on privileged URLs | Do not promise support for internal pages; show a clear message and let the user use the browser’s own print command. |
| PDF contains the loading skeleton | Navigation completed before application data rendered | Wait for a page-specific selector or condition, not just a fixed sleep. |
| Colors look washed out | Print color adjustment changed them | Use print CSS and print-color-adjust, enable printBackground, and review the result in the target PDF viewer. |
| Fonts fall back or text shifts | Web fonts were not ready or were blocked | Await document.fonts.ready, check font URLs and ensure the page can load them in the conversion environment. |
| Pages are unexpectedly blank | A page-break rule, oversized element or CSS page size conflicts with the chosen format | Inspect @page and break rules, constrain oversized media, and test with preferCSSPageSize both enabled and disabled. |
| Puppeteer times out | The site is slow, blocked or waiting on a request that never finishes | Set a bounded timeout, log the failing URL, wait for a meaningful selector, and return a useful error instead of an incomplete file. |
Performance, security and operating cost
- Reuse browsers carefully: launching Chromium is expensive; a worker can reuse a browser and create isolated pages, but close pages after each job and cap concurrency.
- Bound every wait: navigation, selectors, fonts and application readiness need timeouts so one broken site cannot occupy a worker indefinitely.
- Limit input: validate allowed URL schemes, restrict internal network targets where appropriate, and consider sandboxing because a converter visits arbitrary web content.
- Keep artifacts observable: log URL, elapsed time, final response status and a job identifier. Save failed HTML or screenshots only when privacy policy permits.
- Expect page variability: ads, consent dialogs, lazy images, animations and personalized content can change output. Make a documented policy for whether those elements are hidden, waited for or accepted.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request returns a PNG, JPEG, WebP or PDF, so you can keep your extension focused on the user action and call a hosted capture service for the file.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for response options and the complete parameter list. The same request in Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
And Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Before capture, ScreenshotNeo accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and response headers identify the page verdict and whether the request was billed. Its MCP server exposes take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Every feature is on every plan. Create a free ScreenshotNeo account.
Implementation checklist
- Choose whether the primary workflow is a user-operated extension, controlled Puppeteer automation or both.
- Declare only the permissions you need; prefer
activeTabfor click-initiated access. - Use print CSS for navigation, colors and page breaks.
- In Puppeteer, wait for the page’s real readiness signal and fonts before calling
page.pdf(). - Test long content, images, tables, late fonts, authentication and failure pages.
- Set timeouts, validate URLs and isolate browser jobs.
- Document what the user sees, where bytes are generated and how errors are reported.
Frequently Asked Questions
Can a Manifest V3 extension silently save any tab as a PDF?
The documented scripting APIs provide page access and code injection, but this implementation does not rely on a universal direct tab-export method. It opens the browser print flow or delegates URL conversion to a separate service.
Best Value
- ALL-IN-ONE SOLUTION – read, edit, convert, merge and protect your PDF files
- MAXIMUM FUNCIONALITY – create interactive forms, compare PDFs, bates numbering, find and replace text or colors, convert documents, OCR engine, comment, highlight, fill out and print forms, document protection and others
- EASY TO INSTALL AND USE – well-structured user-interface, in-program instructions, free tech support whenever you need it
- GREAT VALUE FOR MONEY - why spend a fortune if you can have maximum functionality at a reasonable price - this also fits the requirements of companies very well
Should I use screen or print media for the PDF?
Use print media for a document designed for paper. Call page.emulateMediaType('screen') when the PDF should preserve the on-screen layout.
Is Puppeteer a replacement for the extension?
No. Puppeteer is a JavaScript browser-automation process. It can test an extension and generate PDFs, while the extension handles the user’s toolbar or context action.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

