GithubHelp home page GithubHelp logo

gcammisa / degooglepdf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elosha/degooglepdf

0.0 0.0 0.0 23 KB

Google Drive PDF downloader

License: MIT License

Shell 23.34% JavaScript 46.00% PowerShell 30.66%

degooglepdf's Introduction

degooglepdf

Download view only protected PDF files from Google Drive. Optimized for large and high quality files.

Howto

  1. Open the desired file at Google Drive in your web browser
  2. Open the browser's JS console and copy-paste the script from downloader.js
  3. Watch the script scroll through the document and wait for the download
  4. Run mkpdf.sh [file] to create a PDF file

Hint

Do you need to fix up the pages before creating a PDF?

  1. Manipulate the images in the folder named after your file
  2. Run mkpdf.sh [file] again and press "y" when asked to use those existing files

Technical details

The browser part downloader.js first simulates a high DPI display to request high resolution pages (you may vary the devicePixelRatio). It then automatically scrolls the displayed PDF to make sure all pages are being loaded. Then the pages (stored as JPEGs in base64-encoded format) will be archived and provided as download.

The bash script mkpdf.sh extracts all images from the archive, processes and then combines them to a proper PDF file.

Application

Someone may have uploaded a PDF file to their Google Drive, but set it to view-only mode. This is problematic in several totally legitimate situations:

  • Offline viewing
  • Viewing without Google tracking
  • Permanent archival
  • Uploader is gatekeeping content they didn't create

Inspiration

Requirements

  • Webbrowser with JS console
  • Unix-like system (bash, sed)
  • ImageMagick (convert) Hint: GNU/Linux users have that, Mac users just need to install ImageMagick via MacPorts or Homebrew.

Requirements for windows users

On windows you need to manually install all the required dependecies:

If you're on windows, you should run mkpdf.ps1 in a Powershell console instead of mkpdf.sh

degooglepdf's People

Contributors

elosha avatar gcammisa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.