Posts Tagged ‘@ ABS DLI Downloader’

Date : October 27, 2015

When I first wrote and shared @ABS DLI Downloader, I did not imagine that it will be useful to so many people and for so many years. I am thankful to everyone who used this software, reported bugs and suggested improvements. Unfortunately, because of time constraint, I will no longer be able to support @ABS DLI Downloader. However, I believe that @ABS DLI Downloader has served it’s purpose and today there are many other free software tools (with more functionality) available for downloading books from the Digital Library of India.

Still, at the moment the following version is working and you may continue to use it (as long as it works!).

 @ABS DLI Downloader v1  .


Date : April 29, 2012

Now the latest version  @ABS DLI Downloader V2.2  is available  here.

The changes in this version includes –

  • Upto 20 missing pages are ignored
  • Books with six digit barcode ( ex – 129886) can be downloaded.
  • The DLI Server http://www.new1.dli.ernet.in is used.

( http://www.new.dli.ernet.in  is down at the moment)


Date : September  02, 2011

The new version of DLI Downloader Software @ABS DLI Downloader V2.1 is out.

You can download it from here .

This is  a quick update to attend the bug (some book not getting downloaded) caused by recent changes in DLI. Comments and feedback for improvement are always welcome.


Date : January 02, 2011

Friends! The new version of DLI Downloader Software @ABS DLI Downloader V2 is out.

You can download it from here .

If you have already used the previous version of this software you would find the same interface with the added advantage of access to more books from different servers of DLI.

If you are visiting for first time and want to know what the heck is this @ABS DLI Downloader and Digital Library of India then read on.


Date : December 11, 2009

Recently I stumbled upon our own Digital Library of India (DLI) http://www.new.dli.ernet.in/ .

DLI  is Hosted by: Indian Institute of Science, Bangalore in co-operation with CMU, IIIT, NSF, ERNET and MCIT for the Govt. of India and 21 participating centers.

It contains a huge collection of scanned books.

It’s just amazing!

The guys out there must have put tremendous efforts to bring the wealth of the knowledge to digital world.

The only blemish in this otherwise excellent work is their presentation.
See for yourself. Their plugin makes reading books online a difficult proposition.Further there is this temptation to download books and read at leisure.

So I did a simple Google search for some downloader software which resulted in a few scripts strewn here and there…nothing solid.

It was then that I decided to do it myself.(With the help of  iText PDF library and Of course Google is always there!)
This resulted in  – @ABS DLI Downloader

Download Here : http://www.4shared.com/file/172956037/2109eb67/_2__ABS_DLI_Downloader.html

Once you provide the barcode of the book to @ABS DLI Downloader it brings the book to your computer and saves it in  C:\DLI as barcode.PDF.

You need JAVA run time installed on your computer to run @ABS DLI Downloader.

If not already installed you can download it from – http://java.com/en/download/manual.jsp

In case you are connecting to internet through a Proxy Server then use the following to rum from windows command shell after suitably replacing proxy host and proxy port for your network.

java -jar -Dhttp.proxySet=true -Dhttp.proxyHost= -Dhttp.proxyPort=3129 @ABSDL~1.jar

So I hope you can download your favorite book . Happy Reading!


Logic of Barcode

Digital Library of India stores books in Tiff format.

The URL for the first page of the book is something like http://www.new.dli.ernet.in/data/upload/0044/297/PTIFF/00000001.tif

Note that page number is stored in the format – 00000001.tif  so the fifth page would be 00000005.tif. and the URL would be http://www.new.dli.ernet.in/data/upload/0044/297/PTIFF/00000005.tif.

Therefore if one could get the first page of URL of the book it is easy to download the rest of the book.

One way would be to  simply query http://www.new.dli.ernet.in/cgi-bin/DBscripts/allmetainfo.cgi?barcode= mybarcode

And extract the URL of first page of the book from the response.

However, I found some interesting pattern while playing with DLI. Only last seven digits of barcode are used in forming URL of first page. Do you notice the 0044/297 part in example above? This is created by using the barcode of the book which in this case is 5990010044292. Notice that 0044 is same as in barcode. And 297 = 292 + 5!

Here is the complete logic of converting barcode to URL.

String BarCodeToUrl(String barCode) {

String myURL=null;

// An Example of URL representation in this program

//  http://www.new.dli.ernet.in/data_copy/upload/0081/748/PTIFF/00000001.tif

//  ******urlpart1*************|urlpart2*|*****

String urlpart1 = “http://www.new.dli.ernet.in/”;

String urlpart2 = null; // data_copy

String urlpart3 = “/upload/”;

String urlpart4 = null;  // 0081

String urlpart5 = “/”;

String urlpart6 = null;  //748

String urlpart7 = “/PTIFF/”;

String urlpart8 = “00000001.tif”;

int len = barCode.length();

String barcodepart1 = barCode.substring(len – 7, len – 3); // The 4 digits before barcodepart2

String barcodepart2 = barCode.substring(len – 3); // Last 3 digits of barcode

urlpart4 = barcodepart1;

int bar1;

int bar2;

try {

bar1 = Integer.parseInt(barcodepart1);                    // Convert string to integer

bar2 = Integer.parseInt(barcodepart2);                    // convert string to integer

} catch (java.lang.NumberFormatException e) {

return null;

} // invalid bar1

// This is the logic of coverting barcode to URL

if (bar1 <= 51) {

urlpart2 = “data”;

} else if (52 <= bar1 && bar1 <= 85) {

urlpart2 = “data_copy”;

} else if (86 <= bar1 && bar1 <= 123) {

urlpart2 = “rawdataupload”;

} else if (124 <= bar1 && bar1 <= 132) {

urlpart2 = “rawdataupload1”;



if (urlpart2 != null) {

if (bar1 <= 85) {

urlpart6 = String.valueOf(bar2 + 5);

} else if (86 <= bar1 && bar1 <= 100) {

urlpart6 = String.valueOf(bar2);

} else if (101 <= bar1 && bar1 <= 132) {

urlpart6 = String.valueOf(bar2 + 2);


if (urlpart6.length() == 1) {

urlpart6 = “00” + urlpart6;

} else if (urlpart6.length() == 2) {

urlpart6 = “0” + urlpart6;


myURL = urlpart1 + urlpart2 + urlpart3 + urlpart4 + urlpart5 + urlpart6 + urlpart7 + urlpart8;


return myURL;




One thing you must have noticed that maximum number allowed for  bar1 is 132 therefore if you try to download a book say A Pocket-Book For Mechanical Engineering., 99999990163321. with bar1 = 163

DLI  does not show this book and hangs without giving any warning.

@ABS DLI Downloader would give you the error message – “Digital Libray Error-Try Another Barcode”.

Update on 02 Jan 2011 DLI has resolved this missing link issue and now with @ABS DLI Downloader V2 you can download all such books.


Read Full Post »