Archive for the 'Ubuntu' Category

pdfsizeopt-a Free and Open Source PDF Manipulation Tool to Reduce PDF File Size

pdfsizeopt is open source project hosting on Google Code, the main feature is PDF file size optimizer.

About

pdfsizeopt is a collection of best practices and scripts for Unix to optimize the size of PDF files, with focus on PDFs created from TeX and LaTeX documents. pdfsizeopt is developed on a Linux system, and it depends on existing tools such as Python 2.4, Ghostscript 8.50, jbig2enc (optional), sam2p, pngtopnm, pngout (optional), and the Multivalent PDF compressor (optional) written in Java.

The author says it is A Linux solution, and I have test it on my DreamHost, it works. I have tried a PDF, the original PDF is 5.6M, and the optimized/converted PDF is 4.4M, great!

Another great thing, I am working on port it to windows, and all tools needed are ready(some download from website, some compiled by myself, for example jbig2), and have successfully modified pdfsizeopt.py to let it work under windows now, though it still has many bugs(I have submit them to the author) and I will release it later.

Installation instructions

Please note that not all the software mentioned in the instructions below is free software (if we consider freedom). Details:

  • pdfsizeopt: free
  • Python: free
  • Ghostscript: free version available
  • Java: free version available (OpenJDK)
  • sam2p: free
  • jbig2: free (http://github.com/agl/jbig2enc/tree/master)
  • png22pnm: free
  • pngtopnm: free
  • Multivalent.jar: not free software, but you don’t have to pay for using it, and you can download it from the official web site without having to pay
  • PNGOUT: not free software, but you don’t have to pay for using it, and you can download it from the official web site without having to pay

Necessary:

  1. A Unix system is needed, Linux is recommended. The following instructions have been tested on Debian Etch and Ubuntu Hardy.
  2. Install Python 2.4, Python 2.5 or Python 2.6 from package. Earlier or later versions won’t work.
  3. Install Ghostscript 8.61 or later. (You may try pdfsizeopt with Ghostscript 8.54 as well, but 8.54 has some known font conversion problems, so it will produce an error for some PDF files.) Earlier versions won’t work. Make sure the command gs is on your $PATH.
  4. Create a directory named pdfsizeopt.
  5. Check out the source code at http://code.google.com/p/pdfsizeopt/source/checkout , or just download http://pdfsizeopt.googlecode.com/svn/trunk/pdfsizeopt.py as pdfsizeopt/pdfsizeopt.py.
  6. Install a recent sam2p and copy the binary to pdfsizeopt/sam2p. For Linux, the recommended binary is http://pdfsizeopt.googlecode.com/files/sam2p . Please note that the sam2p in Ubuntu Intrepid and Debian Etch is too old. Either compile it yourself, or use the recommended download above.
  7. Install pngtopnm from package, or download the Linux binary from http://pdfsizeopt.googlecode.com/files/png22pnm to pdfsizeopt/png22pnm.

Optional, but strongly recommended:

  1. Install Java 1.5 or newer from package. javac is not necessary. Sun’s Java and OpenJDK are OK, gcj and gij won’t work. Make sure that java -version works and prints something at least 1.5.
  2. Download Multivalent*.jar from http://sourceforge.net/project/showfiles.php?group_id=44509&package_id=37068 (example: Multivalent20060102.jar), and copy it to pdfsizeopt/Multivalent.jar.
  3. Compile jbig2 for yourself, or download the Linux binary from http://pdfsizeopt.googlecode.com/files/jbig2 to pdfsizeopt/jbig2.

Optional, but recommended:

  1. Download the PNGOUT binary for your system. Recommended for Linux: the http://static.jonof.id.au/dl/kenutils/pngout-20070430-linux-static.tar.gz archive on http://www.jonof.id.au/kenutils . For other PNGOUT downloads, visit http://advsys.net/ken/utils.htm . Copy the file pngout-*-linux-static to pdfsizeopt/pngout.

Try it:

  1. Create a file test.pdf, and run pdfsizeopt.py --use-pngout=true --use-jbig2=true --use-multivalent=true test.pdf. The output file will be test.pso.pdf.
  2. If you haven’t installed some of the tools above, try changing =true to =false in the command line.

references,
pdfsizeopt home page
Convert JBIG2 to PDF with free and open source software agl’s jbig2enc
Windows version JBIG2 Encoder-Jbig2.exe

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

Installing FreeNX in Ubuntu 8.10 Intrepid Ibex

FreeNX is a system that allows you to access your desktop from another machine over the internet. You can use this to login graphically to your desktop from a remote location. One example of its use would be to have a FreeNX server set up on your home computer, and graphically logging in to the home computer from your work computer, using a FreeNX client.
It’s Open Source, secure (SSH based), fast and versatile!
NX means “Next Generation Remote Display“, is an exciting new technology for remote display. It provides near local speed application responsiveness over high latency, low bandwidth links. The core libraries for NX are provided by NoMachine under the GPL. FreeNX is a GPL implementation of the NX Server and NX Client Components.

Here is a easy tutorial that I used to install FreeNX and NX Client.
1.Add the repository in the source file(/etc/apt/sources.list)
# Ubuntu FreeNX Repository for Intrepid
deb http://ppa.launchpad.net/marceloshima/ubuntu intrepid main
deb-src http://ppa.launchpad.net/marceloshima/ubuntu intrepid main
deb http://ppa.launchpad.net/freenx-team/ubuntu intrepid main
deb-src http://ppa.launchpad.net/freenx-team/ubuntu intrepid main

2>update and install freeNX
apt-get update
apt-get install freenx-server

3.install NX client,
windows user, please download NX Client for Windows
ubuntu/Linux user, use nxclient
apt-get insall nxclient

Reference,
https://help.ubuntu.com/community/FreeNX
FreeNX: Free Software (GPL) Implementation of the NX Server
Installing FreeNX in Ubuntu 8.04 Hardy & 8.10 Intrepid Ibex

P.S. NX vs VNC
NX is much faster than VNC. However, with NX you cannot share a desktop. You can only create new
sessions. That’s why we still use VNC, e.g. for training purposes.
NX bases on X windows, so there is no NX server solution for windows.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

JD-GUI Another Fast Java Decompiler

Introduction
The aim of “Java Decompiler” project is to develop tools to decompile and analyze Java 5, and upper, “.class” files.
Some facts:
* The final release of JSR 176, defining the major features of the J2SE 5.0, has been published the september 30, 2004.
* The lastest Java version supported by JAD, the famous Java decompiler written by Mr. Pavel Kouznetsov, is 1.3.
* Most of Java decompilers downloadable today from Internet, such as “DJ Java Decompiler” or “Cavaj Java Decompiler”, are powered by JAD : they can not display Java 5 sources.

Main features
* JD-Core and JD-GUI are written in C++. This allows an extremely fast decompilation and a display.
* JD-Core does not require the Java runtime environment for its functioning, therefore no special setup is required.
* JD-Core works with most current compilers including the following:
o jdk1.1.8
o jdk1.3.1
o jdk1.4.2
o jdk1.5.0
o jdk1.6.0
o jikes-1.22
o harmony-jdk-r533500
o Eclipse Java Compiler v_677_R32x, 3.2.1 release
o jrockit90_150_06
* JD-Core supports the following new features of Java 5:
o Annotations
o Generics
o Type “enum”
* JD-GUI supports Drag and Drop.
* JD-GUI supports JAR files.
* JD-GUI displays color coded Java source code.
* JD-GUI allows you to browse the “class” files hierarchy.
* JD-GUI displays “log” files, and allow you to decompile “class” files appearing in Java stack traces.
* JD-Core and JD-GUI use the excellent cross-platform wxWidgets toolkit.
Downloads
jd-gui-0.2.5.windows.zip
jd-gui-0.2.5.linux.i686.tar.gz
jd-gui-0.2.5.osx.i686.dmg

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride