Hi Raffael, That's a mighty big document if you have a 167mb RTF file.
I did answer your question. iText is written to support Word 2003, not Wordpad. Take the same test and open/save it with Word and your results will be different. For that matter, use any other reader/writer and your results may be different. The following are all reasons it could be larger or smaller. 1. A reader is entitled to ignore any keywords it does not recognize. So, some tags written by iText may be ignored and removed by Wordpad at opening. 2. A writer is entitled to write or not write default values at it's discression. So, some tags that may be written by iText, may not be written the same by another writer. 3. Any image may be represented in binary or hex-encoded. So, if an image is say 100 bytes, written in binary it would be 100bytes, but if it was hex-encoded it would be 200 bytes. Thus it may enlarge or shrink depending on the source and destination file.. 4. Some images my contain double the data in shapepict keywords. This may be stripped out by some readers/writers. 5. Styles, Fonts, etc. may be stripped out if they are not recognized by the reader and therefore not included when the writer generates the new file. and, yes, the line feeds can cause files to be larger also. Try your same test using different versions of MS Word or Open Office other other applications and your results will vary drastically. Howard Shank ----- Original Message ---- From: GAMBELLI Raffaele <[EMAIL PROTECTED]> To: Post all your questions about iText here <[email protected]> Sent: Wednesday, April 30, 2008 10:04:35 AM Subject: Re: [iText-questions] [RTF] - size is too much big Thanks Howard, nevertheless you haven't answered to my question. RTF itext(167MB) Same RTF opened and saved without modify it with WORDPAD (48MB) 100 MB can't be only default question or standard question. Thanks, regards Raffaele -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Howard Shank Sent: mercoledì 30 aprile 2008 15.55 To: Post all your questions about iText here Subject: Re: [iText-questions] [RTF] - size is too much big Mi Raffaele, According to the RTF Specification, Writers are able to be as verbose as they want to be in generating RTF documents. This means some may output default values and so may not thereby increasing/decreasing the size of the generated RTF. If there are images, they are also entitled to generate either a binary or hex representation of the data also. Various RTF writers will generate different sizes of documents because they write different information. HOward Shank ----- Original Message ---- From: GAMBELLI Raffaele <[EMAIL PROTECTED]> To: [email protected] Sent: Wednesday, April 30, 2008 3:49:12 AM Subject: [iText-questions] [RTF] - size is too much big Hi all, hi Mark, My users, have let me know that an RTF produced with Itext, if opened with WordPad and resaved, its size becomes very smaller than the original itext version. Perhaps, could one reason be due from the newline characters inserted at the end of almost each tag? And so, in documents very very big, those newline have a big weight in global document size? In your opinion Mark, are there any possible reasons? Thanks in advance, best regards. Raffaele ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar
