Hi,
I must admit, that I didn't take the size of the resulting jars into
consideration when adding the new features to the repository.
While I agree that currently the RtfCtrlWordBase_* classes take up a
lot of space for no additional return value, this will change, as they
are fleshed out. As far as I have understood it, Howard is not only
adding the functionality for importing RTF into the RtfWriter2, but
also writing the required import facilities to convert RTF into any of
the output formats that iText supports. With that in mind, a major
number of the RtfCtrlWordBase_* classes will have to be fully
implemented. If (and I don't know what this number will be in the end,
Howard?) that number is larger, then we would be in the same situation
again, and it's better to find a solution for it now, even if at this
moment there would be a trivial fix.
If we end up having to split the functionality at some point I would
recommend the following approach:
* Leave the RTF generation functionality in the main jar file
* Create a separate jar that contains only the RTF parsing component
Greetings,
Mark
On 5 Dec 2007, at 16:34, Paulo Soares wrote:
> I'm not that worried about the speed, I'm more worried about the size
> both of the source and of the jar. Currently the source takes up 1.6M
> and the jar 1.5M but with the new RTF features that source is 9.5M and
> the jar 5.5M. With sizes like this it will be needed to create a jar
> for
> PDF and another for RTF.
>
> Let's have a look at the current structure. In basectrlwords package
> the
> classes are of the type:
>
> public class RtfCtrlWordBase_ab extends RtfCtrlWordBase {
> public RtfCtrlWordBase_ab(RtfParser rtfParser){
> super(rtfParser, "ab", 0, false, RtfCtrlWordType.TOGGLE,
> RtfCtrlWordPropertyType.UNIDENTIFIED);
> }
> }
>
> Just parameters that could be called directly in RtfCtrlWordBase
> constructor.
>
> In ctrlwords.document the classes are of the type:
>
> public class RtfCtrlWord_ab extends RtfCtrlWordBase_ab {
> public RtfCtrlWord_ab(RtfParser rtfParser){
> super(rtfParser);
> }
> }
>
> Looks like it does exactly the same as the base class.
>
> In RtfCtrlWordMgr.java we have:
>
> add("ab", new RtfCtrlWord_ab(rtfParser));
>
> In RtfCtrlWords.java we have:
>
> if(!kwdTable.containsKey("ab")) kwdTable.put("ab", new
> RtfCtrlWordBase_ab(rtfParser));
>
> this coud be replaced with (changing the abstract and protected in
> RtfCtrlWordBase):
>
> kwdTable.put("ab", new RtfCtrlWordBase(rtfParser, "ab", 0, false,
> RtfCtrlWordType.TOGGLE, RtfCtrlWordPropertyType.UNIDENTIFIED));
>
>
> I think that 3600 classes could be eliminated without loss of
> functionality and it would always be possible to extends
> RtfCtrlWordBase
> for some specific uses. This would probably allow iText to be
> distributed in a single jar.
>
> Paulo
>
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On
>> Behalf Of Howard Shank
>> Sent: Wednesday, December 05, 2007 3:47 PM
>> To: Post all your questions about iText here
>> Subject: Re: [iText-questions] RTF Parser update
>>
>> Paulo,
>>
>> The tests in the previous message were run in debug mode.
>>
>> Running in release mode (no debug) the timings for creation
>> and population of the HastMap object are in the 60ms range.
>>
>> Howard
>
>
> Aviso Legal:
> Esta mensagem é destinada exclusivamente ao destinatário. Pode
> conter informação confidencial ou legalmente protegida. A incorrecta
> transmissão desta mensagem não significa a perca de
> confidencialidade. Se esta mensagem for recebida por engano, por
> favor envie-a de volta para o remetente e apague-a do seu sistema de
> imediato. É proibido a qualquer pessoa que não o destinatário de
> usar, revelar ou distribuir qualquer parte desta mensagem.
>
> Disclaimer:
> This message is destined exclusively to the intended receiver. It
> may contain confidential or legally protected information. The
> incorrect transmission of this message does not mean the loss of its
> confidentiality. If this message is received by mistake, please send
> it back to the sender and delete it from your system immediately. It
> is forbidden to any person who is not the intended receiver to use,
> distribute or copy any part of this message.
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell. From the desktop to the data center, Linux is going
> mainstream. Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4_______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/