Friday 24 August 2012

Compiling ghostscript 8.71 from sources

In a recent project, where we are working on converting PDF based newspapers to interactive image slideshows, we came across an issue with ghostscript version 9.05. This version was breaking rendering of some Marathi fonts present in PDF.

When tested on ghostscript version 8.71, conversion was working properly. So we decided to downgrade ghostscript from version 9.05 to 8.71 on our server running Ubuntu 12.04 LS. Below are steps we followed.

Compiling ghostscript 8.71 from sources

Download sources from http://downloads.ghostscript.com/public/

wget http://downloads.ghostscript.com/public/ghostscript-8.71.tar.gz

Uncompress downloaded source code & change to directory.

tar xvf ghostscript-8.71.tar.gz
cd ghostscript-8.71

Configure it (I used all defaults)

./configure

Start compilation with

make

If you encounter following error:

./base/gp_unix.c:148:2: warning: implicit declaration of function 'gettimeofday' [-Wimplicit-function-declaration]  make: *** [obj/gp_unix.o] Error 1

Compile using

make XCFLAGS=-DHAVE_SYS_TIME_H=1

Finally install compiled binaries using

make install

At this point you will ghostscript will be installed at /usr/local/bin/gs

There are other methods to install old versions also, but compilation is safer alternative IMHO.

About the project:

rtCamp is working on an exciting project to connect WordPress with conventional newspaper publishing. The project is in early stages and a sample can be seen at http://anandnagri.com/e-paper/22-aug-2012-3/ (Note: you may see some text in images broken if you visit this on Aug 24 or Aug 25 as all images are recreated using ghostscript 8.71 right now)

 


Related posts:

-- This Post Compiling ghostscript 8.71 from sources is Published on Devils Workshop .





ifttt
Put the internet to work for you. via Personal Recipe 796541

No comments:

Post a Comment