Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scroll & Save PDF

Scroll & Save PDF is a lightweight Chrome extension that automatically scrolls through a webpage to ensure all dynamic content is loaded, then opens the print dialog with full styling and color accuracy—perfect for saving clean and complete PDFs of web pages.

icon

Features

  • 🔄 Automatically scrolls the entire webpage
  • 🎨 Preserves styles and colors in print view
  • 🖨️ Triggers the print dialog for easy PDF saving
  • 🧠 Intelligent delay and scrolling logic to capture dynamic content

Installation

  1. Download or clone this repository:

    git clone https://github.com/yourusername/scroll-save-pdf.git
  2. Open chrome://extensions in your Chrome browser.

  3. Enable Developer mode (top right).

  4. Click Load unpacked and select the extension's folder.

Usage

  1. Navigate to the webpage you want to save as PDF.
  2. Click the extension icon in your toolbar.
  3. In the popup, click Start.
  4. The page will automatically scroll to the bottom.
  5. Once complete, the print dialog will appear—use it to save the page as a PDF.

Project Structure

.
├── background.js       # Background service worker
├── content.js          # (Currently unused but reserved for future functionality)
├── icon.png            # Extension icon
├── manifest.json       # Chrome extension manifest (v3)
├── popup.html          # UI for the extension popup
├── popup.js            # Main logic for scroll & print
└── README.md           # This file

Technical Notes

  • The extension uses chrome.scripting to inject JavaScript into the active tab.
  • Ensures color accuracy during printing using -webkit-print-color-adjust.
  • Handles infinite scrolling content by scrolling the page in increments and delaying before triggering window.print().

Permissions

  • activeTab: Needed to access the currently open tab.
  • scripting: Required to inject the scroll & print function.

License

MIT License. See LICENSE for more details.

About

Scroll & Save PDF

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages