From: "catal" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
Subject: Database data - PDF
Date: Thu, 4 Sep 2003 17:11:24 +0300
MIME-Version: 1.0
Received: from mail.apache.org ([208.185.179.12]) by mc8-f36.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Thu, 4 Sep 2003 07:11:36 -0700
Received: (qmail 87684 invoked by uid 500); 4 Sep 2003 14:11:25 -0000
Received: (qmail 87635 invoked from network); 4 Sep 2003 14:11:25 -0000
Received: from unknown (HELO benz.vision-systems.ro) (213.157.171.207) by daedalus.apache.org with SMTP; 4 Sep 2003 14:11:25 -0000
Received: (qmail 17206 invoked from network); 4 Sep 2003 13:55:38 -0000
Received: from catalin.vision-systems.ro.0.168.192.in-addr.arpa (HELO catal) (192.168.0.11) by 192.168.0.1 with SMTP; 4 Sep 2003 13:55:38 -0000
X-Message-Info: JGTYoYF78jHWwUJBB68dgmINa2YqTuBD
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: <mailto:[EMAIL PROTECTED]>
list-unsubscribe: <mailto:[EMAIL PROTECTED]>
list-post: <mailto:[EMAIL PROTECTED]>
Delivered-To: mailing list [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2720.3000
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2727.1300
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 04 Sep 2003 14:11:36.0508 (UTC) FILETIME=[73AE1FC0:01C372EE]


HI

I used FOP for about 6 months for generating dinamic PDFs. Mainly the reports I generate are in table-like form and currently I use the following pattern:
I get data from PostgreSql database. I've have made a library from classes that wraps fo elements. For example I build a table cell using:


FoTableCellAttributes rowCellAtrs = new FoTableCellAttributes(FoColors.WHITE, new FoSize(1,FoUnits.PT).toString(), new FoSize(0.5,FoUnits.PT).toString(), FoBorder.BORDER_STYLE_SOLID, null);
FoBlockAttributes rowBlockAtrs = new FoBlockAttributes(FoFonts.TIMES,new FoSize(10,FoUnits.PT),FoColors.RED,FoAlign.TEXT_ALIGN_JUSTIFY,null,null,null,null,FoAlign.VERTICAL_ALIGN_MIDDLE);
new FoTableCell("text i want in this cell",rowBlockAtrs,rowCellAtrs)


of course I have classes for table and flows and allmost everything I need to put in an PDF file.
All this classes overrides "toString" method so every class will print the corresponding Fo code. For example FoBlock class will have it's "toString" result something like:<fo:block font_size.....
Now all this classes are using the hierachy that fo elements have, so all this classes are added to their parents and finnaly to a class that represents the fo container.

After i build this container I use a DataOutputStream to put the "toString" representation of all this classes in a Fo file. This file I pass to FOP to convert to PDF.
The main problem is that this mechanism takes quite a long time to get done.

The mechanism described above that take a long time is only the part where you write your Data into the FO file or it's include all the process that you write in the content of this message ??





Now the question: Is that a better way to do this? I realy have the feeling that there is way to do this more easily and more optimal.

Maybe there is a better way !! But we need more explanation about your process maybe with some example!


Felix


-- --
-----------------------------------------------------------------------------------------------
Dumitru Marius Catalin S.C. Vision Systems S.R.L.
( IT Consultant ) Mihail Kogalniceanu 21
Business Palace - Centrul Civic
Brasov, Romania


voice: +40-723-508411                 Tel./fax. +40-268-419755
http://www.vision-systems.ro                               Homepage

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to