Skip to content

hpark3/viewer-saver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ViewerSaver



ViewerSaver

Browser-only document capture for local use.

Release Python License Contributions Welcome Demo

English | 한국어 README

Overview

ViewerSaver saves browser-only documents such as Canva and slide viewers to PDF on your own machine. Real capture is designed around local Playwright execution, while the public demo is separated so you can preview the interface without exposing the full runtime.

Current limits:

  • Real capture is not supported in cloud-only deployment because browser automation is required.
  • The main workflow is designed for local execution.
  • Windows is the primary development environment; macOS and Linux are best-effort.

Live Demo

snapdoc-demo.vercel.app redirects here automatically. Old bookmarks will still work.

  • Note: The deployed demo is a mocked-response UI preview, not the full live capture runtime.

How It Works

  1. ViewerSaver opens the target document in Playwright Chromium and captures pages locally.
  2. The app surfaces preview and error-review steps so you can check failed or suspicious pages.
  3. Final output is assembled into a PDF for download after review or replacement.
readme-1.mp4
readme-2.mp4

Requirements

  • Disk Space: ~150 MB free (Playwright Chromium ~130 MB + Python packages)
  • Python 3.10+ recommended (3.9 may fail on Windows dependency installs)
  • Node.js 18+
  • Playwright Chromium
  • Poppler for Windows (required on Windows for Stage 2 page previews)

On Windows, install Python before starting the setup. During Python installation, enable Add python.exe to PATH. You can confirm the install in PowerShell or Command Prompt with py --version. On Windows, prefer py commands instead of python. On macOS and Linux, use python3.

Tech Stack

Layer Technology
Frontend Vite 6 + React 19 + TypeScript + TailwindCSS 4
Animation motion (framer-motion v12)
Backend FastAPI + uvicorn (Python)
PDF Engine Playwright + pypdf + pdf2image

Installation Guide

Choose your path: One-Click Setup (Windows only) | Windows First-Time Setup | Quick Start (macOS / Linux / advanced users)

One-Click Setup (Windows only)

Use this if you are on Windows and want the easiest local setup path. This is the simplest way to run the app after Python, Node.js, and Poppler are already installed. If this is a brand-new PC, start with Windows First-Time Setup.

Option A: Paste commands into PowerShell or Command Prompt

  1. Open Windows PowerShell or Command Prompt.
  2. You can open either one from the Start menu by searching for PowerShell or cmd.
  3. Copy and paste these commands one line at a time, then press Enter after each line.

If you are using Windows PowerShell:

git clone https://github.com/hpark3/viewer-saver.git
cd viewer-saver
.\run.bat

If you are using Command Prompt:

git clone https://github.com/hpark3/viewer-saver.git
cd viewer-saver
run.bat
  1. A black terminal window will stay open while setup runs.
  2. When setup finishes, open http://localhost:8000 in your browser.
  3. Keep that window open while using the app. If you close it, the local server stops.

Option B: Download the project and double-click run.bat

  1. Open the GitHub repository page in your browser.
  2. Click the green Code button.
  3. Click Download ZIP.
  4. Extract the ZIP file.
  5. Open the extracted folder.
  6. Double-click run.bat.
  7. When setup finishes, open http://localhost:8000 in your browser.
  8. Keep the run.bat window open while using the app.

run.bat installs the required dependencies, builds the frontend, and starts the local app for you. You do not need to run npm run dev for this user-style local launch.

Windows First-Time Setup

Use this if you are on Windows and this PC has never been used for Python projects before.

  1. Install Python 3.10 or newer on Windows.
  2. During the installer, enable Add python.exe to PATH.
  3. Install Poppler for Windows and add its Library\bin folder to PATH.
  4. Open a new PowerShell or Command Prompt window.
  5. Check that Python is installed:
py --version

If that does not work, try:

python --version

If neither command works, Python is not installed yet or the terminal needs to be reopened after installation.

  1. Check that Node.js is installed:
node --version

If node is not recognized, install Node.js 18 or newer before continuing.

  1. Check that Poppler is installed:
where pdfinfo

If pdfinfo is not found, install Poppler for Windows and add its Library\bin folder to PATH, or set POPPLER_BIN_PATH to that folder.

  1. Run the full setup step by step:
git clone https://github.com/hpark3/viewer-saver.git
cd viewer-saver
py -m pip install -r requirements.txt
py -m playwright install chromium
cd frontend
npm install
npm run build
cd ..
py backend/server.py
  1. Open http://localhost:8000.

Quick Start

Use this if you are on macOS or Linux, or if you are comfortable running terminal commands yourself. This path is for the full local app with one browser entry at http://localhost:8000. The backend serves the built frontend bundle after npm run build.

Windows

Use Windows PowerShell or Command Prompt. If pip or python is not recognized, install Python 3.10+ first and reopen the terminal.

git clone https://github.com/hpark3/viewer-saver.git
cd viewer-saver
py -m pip install -r requirements.txt
py -m playwright install chromium
cd frontend
npm install
npm run build
cd ..
py backend/server.py

Open http://localhost:8000.

macOS / Linux

git clone https://github.com/hpark3/viewer-saver.git
cd viewer-saver
python3 -m pip install -r requirements.txt
python3 -m playwright install chromium
cd frontend && npm install && npm run build && cd ..
python3 backend/server.py

Open http://localhost:8000.

Frontend hot reload and contributor-focused local development notes live in .github/CONTRIBUTING.md.

Usage

  1. Open http://localhost:8000.
  2. Paste the document URL you want to capture.
  3. Choose Fast or Quality mode.
  4. Review detected error pages after capture.
  5. Re-capture or upload fixes, then save the final PDF.

Restarting the App

After the first setup, you do not need to reinstall dependencies.

Windows (Easiest)

  1. Open the viewer-saver folder in File Explorer.
  2. Double-click the run.bat file.
  3. Keep the terminal window open while using the app.

macOS / Linux

Open your terminal in the project folder and run:

python3 backend/server.py

Advanced: Using the Terminal (Windows)

If you prefer running commands manually, navigate to the project folder first:

  1. Navigate to the folder:
    cd viewer-saver
  2. Run the server:
    • In PowerShell: .\run.bat
    • In Command Prompt (CMD): run.bat

Tip: In File Explorer, you can quickly open a terminal in the current folder by Shift + Right-click on any empty space → "Open PowerShell window here".

The app will be available at http://localhost:8000.

Temporary Files

ViewerSaver automatically cleans temporary files in output/temp/ and output/previews/ on server startup and on graceful shutdown (Ctrl+C in terminal).

Windows note: Closing the terminal window directly (X button) is a force-kill and skips the shutdown cleanup. Files will be cleared automatically the next time you start the server. To clear manually, delete the contents of output/temp/ and output/previews/.

Documentation

Roadmap

We are working on several features to improve the document preservation experience:

  • Manual Screenshot Upload (#13): Merge your existing screenshots or images into a single PDF.
  • Desktop OS Notifications (#14): Get notified when a long capture session is complete or has failed.
  • Advanced PDF Merger (#15): Merge multiple existing PDF files into one.
  • Output Folder Cleanup Button (#30): In-app button to clear temp and preview files without restarting the server.
  • One-Click App Restart (#31): Desktop shortcut auto-creation on first run + in-app server-down detection screen.

Contributing & Support

We welcome contributions of all sizes, including bug fixes, documentation improvements, and small UX polish. Please start with the .github/CONTRIBUTING.md for local setup and contribution guidelines.

Open a GitHub Issue for bugs, feature requests, or larger changes you want to discuss first. Open a Pull Request for focused fixes, documentation updates, or well-scoped improvements. Use Discussions for questions, early ideas, or anything still exploratory.

License

GNU Affero General Public License v3.0

About

Automation scripts for capturing viewer-only documents and exporting them as images or PDFs using browser-based rendering.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors