Openoffice.org API allows Java developers to access (read/write/export) the different supported fileformats within OpenOffice.org. The Drawback of this solution is that OpenOffice.org must be installed on client machine to enable your Java application to bootstrap the default OpenOffice.org process on the user machine.This constitutes a limitation, as every Java application using Openoffice API must ship also an OpenOffice.org installation or require user to install it before using the application.
The answer to this Limitation is the ODF Toolkit Project. this library can manipulate ODF files without worrying if OpenOffice.org is installed on client machine.
ODF Toolkit is Great tool but has its limitations too . it is currently only able to read/write ODF files but there is no option to export ODF files as PDF or any other non-ODF format. Sadly, the ODF Toolkit has currently no converters included within the project.
with more research i found another project jOpenDocument which seems to be similar to ODF Project . It is A pure Java library for OASIS Open Document files manipulation . One Great feature of jOpenDocument is that it can be used to create PDF files from ODF files. PDF generation with jOpenDocument requires also the use of the iText library. The iText library is available for free under a multiple license: MPL and LGPL.
Read this tutorial about how to Create a PDF document from a spreadsheet using jOpenDocument and iText.