Wednesday, January 21, 2009

JAVA VERSION NAMES

JAVA VERSION CODE NAME N RELEASE DATE

Version

Description of Code Name

Code Name

Date of Release

JDK 1.1.4

Sparkler

Sept 12, 1997

JDK 1.1.5

Pumpkin

Dec 3, 1997

JDK 1.1.6

A female character in Bible

Abigail

April 24, 1998

JDK 1.1.7

Roman cognomen used by several politicians

Brutus

Sept 28, 1998

JDK 1.1.8

Name of a person/Football club

Chelsea

April 8, 1999

J2SE 1.2

Playground

Playground

Dec 4, 1998

J2SE 1.2.1

 

(none)

March 30, 1999

J2SE 1.2.2

Cricket

July 8, 1999

J2SE 1.3

Kestrel

May 8, 2000

J2SE 1.3.1

Ladybird

May 17, 2001

J2SE 1.4.0

Merlin

Feb 13, 2002

J2SE 1.4.1

Hopper

Sept 16, 2002

J2SE 1.4.2

Mantis

June 26, 2003

J2SE 5.0 (1.5.0)

Tiger

Sept 29, 2004

Java SE 6

Mustang

 

Java SE 7

Dolphin

 

You can these names on the sun website.

Here is the brief history of java. Some of you wanted to know that how many packages are there in java when it is officially released well here are the some facts.

Java 1.0 - 212 classes in 8 packages

Java 1.1 - 503 classes in 23 packages

Java 1.2/2.0 - 1,520 classes in 59 packages

Java 1.3 - 1842 classes in 76 packages

Java1.4 - 2991 classes in 135 packages

Java 5.0 - 3562 classes in 166 packages

Tuesday, January 20, 2009

Generate PDF files from Java Applications dynamically

Generate PDF files from Java Standalone/Web Applications dynamically

IText is a freely available Java library from Lowagie.com. The iText library is powerful to generating PDFs.

Pre-requisites:

  1. Itext-2.1.4.jar (To download http://www.lowagie.com/iText/download.html )

    Optional (If we need to align text as traditional format):

    1.itext-hyph-xml.jar (To download http://sourceforge.net/project/showfiles.php?group_id=15255&package_id=151860&release_id=326129)

Configuring iText in Eclipse :

Being a pure Java library, iText comes in the form of a JAR file . Once you have downloaded the library (let's say, at path C:\temp), the following steps will configure the iText library in an Eclipse environment:

  1. Create a new Java project in Eclipse named like iText .
  2. Right-click on the iText project in Package Explorer view and select Properties.
  3. Click Java Build Path. On the Libraries tab, click Add External JARs.
  4. Browse to the C:\temp directory and select the itext-2.1.4.jar in this directory.
  5. Click OK.

OR

Place itext-2.1.4.jar file into your project lib folder (eg: G:\eclipseworkspace\Apps-Web\WebContent\WEB-INF\lib)

The iText API: Closer look

The com.lowagie.text.Document is the main class for PDF document generation. This is the first class to be instantiated. Once the document is created, we would require a writer to write into it. The com.lowagie.text.pdf.PdfWriter is a PDF writer. Some of the other commonly used classes are given below:

Basic Steps to do:

/* Simple HelloWorld.java program */

Step 1: Create a Document.

Step 2: Get a DocWriter instance (in this case, a PdfWriter instance)

Step 3: Open the Document.

Step 4: Add content to the Document.

Step 5: Close the Document.

 

Document document = new Document(); ------àStep 1

try {

PdfWriter.getInstance(document,new FileOutputStream("HelloWorld.pdf")); --------àStep2

document.open(); -----------------àStep3

document.add(new Paragraph("Hello World")); ---------------àStep4

} catch (Exception e) {

// handle exception

}

document.close(); ------------àStep5

let me know if you have any queries on this(IText).

Regards,

Cheekuri.

IMage TO PDf Conversion Tool

Steps to convert Image (taking the input from scanner) to Pdf format Step1: Installation of the application “Image2PDF v3.2 “ · download url: http://www.verypdf.com/tif2pdf/tif2pdf.htm · save into our local system · Run the application · Configure the setting as we needed(we can customizable settings if needed) Step2: Integration with our Application By calling Process of this application whenever we needed in Application using Java by placing tabs or buttons or links. Sample code: Runtime rt = Runtime.getRuntime(); Process proc = rt.exec("C:/Program Files/VeryPDF Image2PDF v3.2/Image2PDF.exe"); ); Main features: You can take the input from the scanner and storing into Storage location directly using this. Input: Hardcopy of any document to upload as PDF file. Output: Storing as pdf file into file system. You can convert image files to pdf files by selecting the source location or drag the file from windows explorer to tool. Image To PDF Features (Document) Supports TIF, TIFF, JPG, JPEG, PNG, GIF, PCD, PSD, TGA, BMP, DCX, PIC, EMF, WMF, etc. image formats Combines multiple directories and images into one PDF file Does NOT need Adobe Acrobat software Supports Win98/ME/NT/2000/XP/2003/Vista platforms Supports Multi-page image file to PDF conversion Supports sorting on file name when converting batches Image files can be dragged directly from Windows Explorer and converted quickly Supports single file processing, single directory processing, multi-level directory processing and many others Set automatic despeckling (of B/W images; removes noise) and skew-correction Merge several image files into a single PDF file during batch converting, or convert each image file into individual PDF file Makes use of effective compression processing to minimize space occupied by the created PDF files; for example, an A4 paper size TIFF file with a B/W image the output size is about 40KB to 50KB per page; color and gray-scale images are also compressed and optimized Drag and drop image files Password protection for PDF files with 40 or 128 bit encryption Set file permissions to restrict printing, copying, and future modifications to the document Automatically open PDF file after creation Specify any resolution in the generated PDF file Optimized to increase speed Set the document title, subject, author and keywords Supports scanner Supports monitor multiple directories Supports generate bookmarks Supports merge to an existing PDF file (insert before the first page or append to the last page) Note: Trial version for limited usage. Registered version for life time and unlimited (Purchasing cost is $38).