18

I want to download free Google books in pdf format.

Is there any Google Books downloading tool available for Ubuntu?

APLUS
  • 911
  • 2
  • 7
  • 15
  • 1
    duplicate question , maybe this answer could help http://askubuntu.com/questions/339927/download-google-books – Hany Alsamman Aug 12 '14 at 15:07
  • 2
    @HanyAlsamman Not exact duplicate because I clarified "downloader" and however http://askubuntu.com/q/339927 is closed as **unclear**! – APLUS Aug 12 '14 at 15:11
  • 1
    check this tutorial http://www.pc-freak.net/blog/download-books-books-google-greasemonkey-google-books-downloader-script/ – Hany Alsamman Aug 12 '14 at 15:27
  • 3
    Two other solutions I found a while ago: [pysheng](https://code.google.com/p/pysheng/) and [getxbook](http://njw.me.uk/getxbook/). I would write a proper answer but I've never tried these out. So if you feel up to task, please feel free to include these tools in your own post. – Glutanimate Aug 12 '14 at 19:33
  • @HanyAlsamman that answer doesn't come close to answering this OP's question. and the tutorial you've linked to has a downloader that works only on windows and mac OSes. – abcd Aug 10 '15 at 04:01
  • pysheng only downloads the 35 first pages, no matter how many pages does the book have. I don't know if this is a limitation imposed by google or by pysheng. – Eduardo Moreira Aug 20 '21 at 00:26

2 Answers2

9

Thanks to @Glutanimate for his comment to the OP.

getxbook makes a good case for why it is the best option available. I just installed it and used it to download this book with success.

getxbook comes with installation instructions (in the INSTALL file). Once installed, it is run as follows:

$ getxbookgui

Alternatively, the command

$ getgbook book-id

can be used. (The book ID is in the URL for the book. For example, the ID for the book I downloaded is 3pK1-LxtFV4C.)

If only a subset of pages is desired, use

$ getgbook -n book-id

And then enter the pages you want, one at a time, e.g.:

$ getgbook -n book-id
262

When I said the book was downloaded with success, I wasn't being totally honest. For some reason, getxbook missed a few pages that were available in the preview. To get these, I followed these instructions.

Note that the book is downloaded to a sub-directory of the current directory named with the book ID. It is downloaded as a set of .png and/or .jpg files, one per page. These can be converted to .pdf format as follows (after converting the .jpg files to .png files one by one):

$ convert *.png book.pdf

Note that if you intend to print this .pdf on paper, you may need to resize some of the individual images (so that they're all roughly the same size) before converting to the .pdf. I used gimp to do this.

abcd
  • 443
  • 1
  • 5
  • 16
  • make: *** No rule to make target 'util.h', needed by 'getgbook.o'. Stop. PySheng worked for me instead. – Max N Aug 10 '17 at 20:21
  • you can use torify to assist downloading more pages on books that have a page download limit: "torify getgbook book-id" – jester66 Jul 26 '20 at 13:13
  • The instructions to use chrome dev tools to download individual pages is out of date and no longer seems to work. – jester66 Jul 26 '20 at 13:14
9

There is a Python program called PySheng than did the job for me.

It's available on Github at https://github.com/tokland/pysheng

You can run the following commands to install it.

git clone https://github.com/tokland/pysheng
cd pysheng
sudo python setup.py install

Now PySheng will be available from the Termainl.

You can run pysheng-gui and pysheng from the terminal for the GUI and terminal version respectively.

pysheng-gui

PySheng GUI for downloading from Google Books

user3620828
  • 306
  • 2
  • 8
  • According to `pysheng/readme.md`, the correct command for installation (and the one that worked for me) is `sudo python setup.py install`. - I have edited accordingly. –  Oct 12 '16 at 11:41
  • 1
    It is installed by default in the `home` directory. But then it can be moved anywhere and launched by executing `/pysheng/bin/pysheng-gui`. Path to that could be added into a launcher (`desktop` file) put in `~/.local/share/applications`. –  Oct 12 '16 at 12:01
  • 1
    import gtk.glade ImportError: No module named glade Its giving this error. I tried to follow the steps in [git hub](https://github.com/Hackerood/pysheng/issues/6) but I am unable to find /usr/share/pysheng/main.glade in line 362. In fact in the whole script there is no such line. – creative Apr 05 '17 at 21:07
  • @Hirak Try this: sudo apt-get install git python-appindicator python-xdg python-pexpect python-gconf python-gtk2 python-glade2 libxxf86vm1 – Praveen Nov 27 '18 at 05:07