FlyingBuzz wrote: > how come itext pdf are a lot better than if i resave them in adobe? > > i am wondering becuase itext said the pdf suppose to be auto compressed. so > I am not sure if itext is really compressing that well or does adobe have > better methods of byte code to make it smaller? > > For example. > > When i generate a pdf from i text it becomes like 200kbs > > if I resave it in adobe pdf, it goes to 78 kbs > > > Smaller files saves more space and faster to email to customer. So wonder do > i have to change compression and how? > > I tried reading itext manual to search for how to compress files smaller but > cant find much info on it.
When you say you have looked at the PDF, do you mean you have looked INSIDE the PDF? You are pretending that this is a question of 'compression', but I don't think that's the case. When you create a PDF using iText, you go for SPEED!!! This means that as soon as a page is finished, you send the content of the page to the OutputStream; keeping the memory stamp AS LOW AS POSSIBLE. You flush plenty of stuff to the OutputStream BEFORE you even know how big the file will be, what object will come next, etc... When you open the PDF in Acrobat, the PDF is complete. Acrobat KNOWS how many pages there are. Acrobat KNOWS what resources are used. And when you save such a file, most of the times, the PDF is LINEARIZED and resources are OPTIMIZED because the PDF is complete. It's obvious that such an optimization isn't possible when you create a PDF on the fly. Your question sounds a tad disrespectful or maybe I interpret it that way because you are comparing apples with oranges. If I'm wrong please rephrase your question with arguments based on technical facts. Don't just say 'iText uses poor compression' without providing any proof. -- This answer is provided by 1T3XT BVBA ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ 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
