zeltox / Google-Drive-PDF-Downloader

MIT License
435 stars 124 forks source link

Google Drive PDF Downloader

This script will help you to download protected view only PDF files from Google Drive easily.

Features

How to use - Method 1

This method is fast, works for all types of scenarios and performance is great!

  1. Download this repository to your computer and unzip it.
  2. Enter the URL of the protected view only PDF File into your browser. (eg: Firefox, Chrome etc.)
  3. Open the script "Method_1_Script.js" and copy all the contents.
  4. Then open the browser web console.
  5. Paste the copied script into the console and press enter.
  6. After few seconds the browser will prompt you to save a file with extension ".PDF_DataFile"
  7. Save this file and copy it into the "Input" directory which is inside the repository you downloaded earlier!
  8. If you are using Windows then navigate to "Windows" directory and double click on "GeneratePDF.cmd", or If you are using Linux then navigate to "Linux" directory and execute "GeneratePDF"
  9. A successful message will be shown once the whole process completes.
  10. Navigate to the "Output" directory and enjoy!

Tips for Method 1

How to use - Method 2

Use this method only for PDF with less than 20 pages, if you experience any errors or slow down then follow Method 1

  1. Enter the URL of the protected view only PDF File into your browser. (eg: Firefox, Chrome etc.)
  2. Open the script "Method_2_Script.js" and copy all the contents.
  3. Then open the browser web console.
  4. Paste the copied script into the console and press enter.
  5. After few seconds the browser will prompt you to save the PDF file.
  6. Save the file and enjoy!

Tips for Method 2

Author

Inspiration

Inspired from https://codingcat.codes/2019/01/09/download-view-protected-pdf-google-drive-js-code/

Dependencies

Security Tips!