Skip to content

jared-makes-stuff/Page-Capture

Repository files navigation

Page Capture

Page Capture is a Chrome Manifest V3 extension for capturing full pages or scrollable areas, then saving PNG, image PDF, or native selectable-text PDF output.

It supports scroll-stitch image captures, scrollable element captures, a minimal editor/export workflow for raster exports, and a native Chrome PDF mode for text-selectable page output.

Features

  • Capture a full page by scrolling and stitching rendered slices.
  • Capture a scrollable element by auto-detecting a container, dragging a rectangle, or selecting an element.
  • Save a native full-page PDF through Chrome's print pipeline so text can remain selectable where Chrome prints it as text.
  • Edit raster captures with crop, draw, shape, erase, and text tools.
  • Export edited captures as PNG, paged PDF, continuous PDF, or detected document pages.
  • Redact common sensitive fields and custom CSS selectors before capture.

Install Locally

  1. Open chrome://extensions.
  2. Enable Developer mode.
  3. Click Load unpacked.
  4. Select the extension/ folder.

If Chrome reports Manifest file is missing or unreadable, the repo root was probably selected by mistake. Load extension/, not the top-level project folder.

Development

Prerequisites:

  • Node.js 22 or a compatible current Node.js version.
  • npm.
  • Google Chrome or Chromium.

Install dependencies:

npm ci

Run checks:

npm run test:syntax
npm run test:browser
npm audit --omit=optional

Run the same checks as CI:

npm run test:ci

Project Layout

Path Purpose
extension/ Chrome extension source loaded by Chrome.
extension/manifest.json Manifest V3 metadata, entry points, icons, and permissions.
extension/background.js Service worker and capture orchestration.
extension/content.js Page-side capture, scrolling, selection, and redaction logic.
extension/offscreen.js Offscreen canvas/PDF export runtime.
extension/editor.* Editor UI and interaction logic.
extension/popup.* Popup UI and capture settings.
extension/lib/ Shared core and UI helpers plus vendored jsPDF.
extension/fonts/ Vendored Poppins font assets.
extension/tests/ Extension-internal browser test harness.
tests/browser/ Playwright tests that load the unpacked extension.
docs/ Technical documentation and release notes/checklists.

Permissions

The extension intentionally avoids broad host permissions and does not request <all_urls>.

Current permissions:

  • activeTab: capture the active page after the user starts capture.
  • debugger: required by Chrome for native PDF export through Page.printToPDF; this cannot be optional in Manifest V3.
  • scripting: inject the content script when capture starts.
  • storage: store local extension settings.
  • downloads: save generated files.
  • offscreen: render and export captures in an offscreen document.

Documentation

Publication Notes

  • Do not commit packaged extension archives, private keys, certificates, local .env files, Playwright reports, or generated test results.
  • Choose and add a project license before accepting outside contributions.
  • Review the manifest description, permissions, icons, and screenshots before creating a GitHub release or Chrome Web Store submission.

License

No open-source license has been selected yet. Until a license is added, the default copyright restrictions apply.

About

WIP RIGHT NOW CHILLAX

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors