» Archive for October, 2008

JD-GUI Another Fast Java Decompiler

Wednesday, October 22nd, 2008 by rubypdf

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

Batch Remove XMP Meta Data from PDF

Tuesday, October 21st, 2008 by rubypdf

Acrobat has the feature to remove XMP, and you have to remove nodes one by one, with my Batch XMP Remover, you can remove all XMP data of the PDF files from the given folder with the help of Acrobat API.
I will release this product recently.

P.S.

Adobe’s Extensible Metadata Platform (XMP) is a labeling technology that allows you to embed data about a file, known as metadata, into the file itself. With XMP, desktop applications and back-end publishing systems gain a common method for capturing, sharing, and leveraging this valuable metadata — opening the door for more efficient job processing, workflow automation, and rights management, among many other possibilities. With XMP, Adobe has taken the “heavy lifting” out of metadata integration, offering content creators an easy way to embed meaningful information about their projects and providing industry partners with standards-based building blocks to develop optimized workflow solutions.

Pdftk.dll-Dynamic link library Version pdftk

Sunday, October 19th, 2008 by rubypdf

After some modification, I compiled pdftk to Dynamic link library Version, pdftk.dll, and wote a delphi example to show how to use this DLL, here is the delphi example,

program pas;

{$APPTYPE CONSOLE}

//uses
// SysUtils;
function Convert(argc : integer; argv : Array of string): Integer; stdcall; external 'pdftk.dll' name '_Z7ConvertiPPc@8';

var s: Array of string;
i,size:Integer;
begin
size :=System.ParamCount;

SetLength(s,size);
for i:=0 to size-1 do
s[i]:= ParamStr(i+1);
Convert(size,s);
end.

the point of this example is Convert function, and the usage of Convert function is as same as the main method of pdftk.cc, so we can easily implement some new methods, such as encrypt40, encrypt128, decrypt, compress, uncompress, flatten, cat(merge), attach_files, unpack_files, burst/split, fill_form Add_background, Add_stamp, generate_fdf, dump_data, dump_data_fields, update_info, and so on.
so the pdftk.dll has the following features,

      Encrypt PDF with 48-bit and 128-bit support, of course, I can also implement AES support.
      Decrypt PDF
      Compress PDF
      UnCompress PDF
      Flatten PDF
      Cat PDF/Merge PDF, AKA, PDF Cat/PDF Merge
      Attach file to PDF
      Extract attachment from PDF
      Burst/Split PDF, AKA, PDF Split
      Fill PDF Form
      Add background to PDF
      Add stamp to PDF
      Generate FDF from PDF
      Dump data
      Dump data fields
      Update PDF Info
      Get PDF Info
      Repair PDF
      Rotate PDF

and if needed, I can also write a VB module to show how to use the pdftk.dll.
Any way, I still have no plan to release the pdftk.dll, because of some issues.