From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Poupaert Erik
Sent: Friday, March 19, 2004 3:07 PM
To: '[EMAIL PROTECTED]'
Subject: [iText-questions] setLeading(). table.setOffset()
Hi,
I've now struggled quite a bit with these methods of "setLeading" and "setOffset".
By the way, setting them on the contentbyte or on the document itself, doesn't seem to have any effect.
If you generate a pdf document in which you can add/leave out certain parts, you never know what the vertical space is going to be between a part of a document, and the part that follows it.
Attaching the "leading" or "offset" properties to a object such as paragraph, table, and so on, makes the generation of complex pdf documents absolutely unreliable, because you really need to test every case. If you have 15 optional sections, that means that you need to verify 2^15 cases; which is impossible. Therefore, this system of "setLeading()" and "setOffset()" on the individual objects, ensures that the generation of a complex pdf document will invariably be buggy.
It would be much better to work with the concept of a "cursor": "Where am I now?", "go 10 (=leading) points down".
In the end, it all goes back to the same root problem: The iText objects hide the exact coordinates from the user, because it is supposedly a front end not only to pdf, but also to html (who uses that anyway?) and rtf; and in these other formats, you could conceivably never be sure of any coordinates. This design concept of "front end to many formats" reduces iText to least useful of all formats supported. As a result, iText is so much less useful than it could be.
I would really suggest to junk all the html (and even the rtf)-related logic and focus on facilitating the production of high-quality, bug-free pdf.
Greetings
Erik
This message and its attachments may contain confidential information protected by intellectual property rights or other rights & is strictly for the exclusive use of the intended recipient. It is strictly prohibited to copy, alter or disclose this message or its contents to any other person without Elia's prior consent. If you are not the intended recipient of this message, please inform the person who sent it and delete the message from your system. Elia is not liable for any direct or indirect damage arising from errors, inaccuracies or any loss in the message, from unauthorized use, disclosure, copying or alteration of it or as a result of any virus being passed on. This message does not constitute any commitment from Elia except when expressly otherwise agreed between the intended recipient and Elia.
U vindt de Nederlandse versie van deze disclaimer op onze internetsite www.elia.be
Vous pouvez d�couvrir la version fran�aise de ce disclaimer sur notre site internet www.elia.be
Title: setLeading(). table.setOffset()
You can always use ColumnText and PdfPTable and create your
own layout rules.
Best Regards,
Paulo Soares
- [iText-questions] setLeading(). table.setOffset() Poupaert Erik
- Paulo Soares
