Tag Archives: howtos

HOWTO: Batch Download a Book in PDF Pages from NetLibrary

NetLibrary is an online book resources that universities or other individuals pay to supply them with virtual copies of books. These books are available online, and can be searched, downloaded, and saved. The catch is that NetLibrary’s interface limits you to viewing (in horribly slow Acrobat reader) one page at a time. Given how unresponsive Acrobat makes many computers, this can make printing out a long book take hours.

Therefore, I took the effort to figure out how to batch download a book from NetLibrary, saving me valuable time.

My solution uses a combination of Firefox and Perl, but other solutions are of course available.

After I loaded up the first true page of the book in the NetLibrary interface, I gave the frame with the PDF its own Window used Firefox’s Tools | Page Info | Media properties dialog box to determine the URL of the embedded PDF file. It turns out it’s a call to a program named nlReader.dll, but it takes a book identification number and page number as arguments:

http://0-www.netlibrary.com.library.unl.edu/nlreader/nlReader.dll?BookID=BOOKIDGOESHERE&FileName=FILENAMEGOESHERE

Obviously, the library.unl.edu part requires my university proxy. For normal pages, the filename was in the format of Page_1.pdf, Page_2.pdf, etc. So I wrote a perlscript to create hyperlinks to pages 1 to 499, saved the output to HTML, used the DownloadThemAll! Firefox extention to get them, and…

Then Acrobat crashed trying to print out those hundreds of PDFs. Boo! Fortunately, Perl came to my rescue… I used ppm to install the module Perl::Reuse, then wrote a script to append all those pdfs into one. The final product is about 500 pages ans 70 megs, but quite easy to store, print out, etc.

Thanks, NetLibrary!

How To Create a PDF File from a Microsoft Word document in MacOS8

Today’s big adventure, besides watching six hours of 24 Season 3, was making a classic Mac computer generate PDF files from MSWord .doc files. I couldn’t find a free utility to do it in one go, but I was able to use trial-and-error to get it working.

Then I found step-by-step instructions on the web. *sigh*

Anyway, to do it on a Macintosh…

First, you need to convert the .doc file into a .ps (Adobe PostScript) file

 

How to create a Postscript file using a Macintosh Wordprocessor

Instead of printing your document to paper, you can tell your computer to “print to a PostScript file.” What this means is that instead of sending the PostScript code to your printer, your computer will write it to a disk file.

  1. Verify that a reasonably current Postscript Printer Driver has been installed on your system. Best results are achieved using the Laserwriter printerdriver (version 8.4 or later), or the AdobePS printerdriver (version 8.6 or later, or version 8.5.1 with the Virtual Printer plugin. I recommend against using versions of the Laserwriter driver before 8.1: the Postscript files created by these drivers are not completely compatible with other systems. Note that some installers (in particular the AdobePS Installer) may replace newer library files with older versions: always make a backup of the System Folder before installing any new printer drivers.

  2. Select the Postscript printer for printing, either by using the Chooser, by selecting a printer on the desktop and making it the Default Printer, or by using the Printer Selection menu in the Print Dialog of a Word Processor.

  3. Open the document you want to convert to Postscript in your Word Processor. Verify whether all settings in the Page Setup dialog are set correctly.

  4. Select the Print command from the File Menu. In the Print dialog, set Destination to “File“. The Print button should change to a Save button.

  5. Make sure that the following are set correctly

    • Format should be set to “Postscript Job“.
    • Postscript Level should be set to “Level 1 Compatible” or “Level 1, 2 and 3 Compatible“.
    • Data Format should be set to “ASCII“.
    • Font Inclusion should be set to “All But Standard 13“. (Or “All,” but this is important! — tdaxp)
    • Unlimited Downloadable Fonts should be turned off.
    • Cover Page should be set to “None“.

    Note that, depending on the driver you are using, some of these settings may be missing, or found in the Page Setup dialog or the Save Postscript File dialog instead of the Print dialog.

  6. Click on the Save Button in the Print dialog. A Save File dialog window should pop up, possibly including other Postscript options. Verify whether all options are set correctly. and enter a filename for the Postscript file. By convention, Postscript files have names ending in “.ps”.

  7. Click on the Save Button in the Save File dialog. Your wordprocessor will send the document to the printer driver, which will convert it to a Postscript file.

  8. When your printer driver is finished creating the Postscript file (you can check this using the Print Monitor), it is a good idea to check the result by trying to view the Postscript file. Information about viewing Postscript files may be found in ” How to view the files in the ILLC archive“.

medium_adobe_postscript_print_dialog_md.gif
The Adobe Postscript (PS) “Print” Dialog Box

Then, you need to conver that .ps file into a .pdf file. To do this I used MacGSView, which is part of the GhostScript project.

(Just to be safe I also downloaded AFPL Ghostscript 8.51 (downloadable .sit file), which updates some code. But this part is optional — all you need is the Adobe PS code mentioned earlier and MacGSView. Anyway…)

So, to turn your temporary .ps file into a .pdf file

 

  1. Make sure there is a short-cut or “alias” to MacGSView on your desktop. Its icon (the little picture) should have a little ghost.
  2. Drag the .ps file onto the MacGSView short-cut. You can think of this like “feeding the Ghost the PS file”
  3. The .ps file should now be open. Then go to File, and click “Export.”
  4. Select the .pdf file’s location and type its name like you would if you were clicking “Save As” in any other program

 

You’ve just converted a Word Document into an Adobe Acobat file on an old iMac… for free! Congratulations!